Larry Martell
unread,Dec 9, 2016, 9:06:02 AM12/9/16Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
I have an app that is deployed at 15 sites and has been running for 6
years. All these deployments are with django 1.5, python 2.6, CentOS6,
and apache, and they all work perfectly. I just deployed the app at a
new site, but this one is django 1.9, python 2.7, CentOS7, and
nginx/uwsgi. Only at this site we are seeing intermittent 'template
not found' errors. A refresh of the page always works. It happens with
different templates, and there are no errors in any of the logs
(except for the template not found error). I've checked the system
logs, the nginx logs, the uwsgi logs and the django logs.
Anyone know why this would be happening, and/or how I can debug it further?
One thing I noticed, and this may be normal, but I don't know as I've
never encountered this error before, is that in the template not found
error when it lists the directories it searched, they all are in /tmp.
The template it is searching for does exist at
/usr/local/motor/motor/app/cdsem/templates/WaferToWafer/view.html but
it's looking in /tmp/app/cdsem/templates/WaferToWafer/view.html
Is that any indication of a problem?
This is the error I get:
TemplateDoesNotExist at /report/CDSEM/WaferToWafer/
WaferToWafer/view.html
This is the template search:
Template-loader postmortem
Django tried loading these templates, in this order:
Using engine django:
django.template.loaders.filesystem.Loader:
/usr/local/motor/motor/ui/templates/WaferToWafer/view.html (Source
does not exist)
django.template.loaders.app_directories.Loader:
/usr/lib/python2.7/site-packages/django/contrib/admin/templates/WaferToWafer/view.html
(Source does not exist)
django.template.loaders.app_directories.Loader:
/usr/lib/python2.7/site-packages/django/contrib/auth/templates/WaferToWafer/view.html
(Source does not exist)
django.template.loaders.app_directories.Loader:
/tmp/core/alerts/templates/WaferToWafer/view.html (Source does not
exist)
django.template.loaders.app_directories.Loader:
/tmp/core/reports/templates/WaferToWafer/view.html (Source does not
exist)
django.template.loaders.app_directories.Loader:
/tmp/app/cdsem/templates/WaferToWafer/view.html (Source does not
exist)
django.template.loaders.app_directories.Loader:
/tmp/app/semvision/templates/WaferToWafer/view.html (Source does not
exist)
django.template.loaders.app_directories.Loader:
/tmp/app/developer/templates/WaferToWafer/view.html (Source does not
exist)
django.template.loaders.app_directories.Loader:
/tmp/ui/templates/WaferToWafer/view.html (Source does not exist)
django.template.loaders.app_directories.Loader:
/tmp/configuration/templates/WaferToWafer/view.html (Source does not
exist)
And here is my TEMPLATES from settings:
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'motor/ui/templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'context_processors.config',
'ui.context_processors.navigation',
'core.appmngr.context_processor',
],
},
},
]