Opened 12 years ago
Closed 12 years ago
#18346 closed Uncategorized (invalid)
django 1.4 - admin TemplateDoesNotExist at /admin/auth/user/ Options
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | contrib.admin | Version: | 1.4 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
We recently upgraded from django 1.3 to django 1.4. I updated the manage.py
and am also using the wsgi.py as recommended in the release notes. We
deploy to apache using mod_wsgi on our servers and use manage.py runserver
locally.
Locally we get errors when trying to render the admin pages. However on
apache using mod_wsgi the admin pages work. Any ideas?
The errors are
TemplateDoesNotExist at /admin/auth/user/
admin/auth/user/change_list.html, admin/auth/change_list.html,
admin/change_list.html
Request Method:GETRequest URL:http://localhost:8000/admin/auth/user/Django
Version:1.4Exception Type:TemplateDoesNotExistException Value:
admin/auth/user/change_list.html, admin/auth/change_list.html,
admin/change_list.html
Template-loader postmortem
Django tried loading these templates, in this order:
- Using loader django.template.loaders.filesystem.Loader:
- /media/data/work/clean/rmsagit/customers/templates/admin/auth/user/change_l ist.html, admin/auth/change_list.html, admin/change_list.html (File does not exist)
- Using loader django.template.loaders.app_directories.Loader:
- /media/data/work/clean/rmsagit/customers/templates/admin/auth/user/change_l ist.html, admin/auth/change_list.html, admin/change_list.html (File does not exist)
Attachments (1)
Change History (4)
comment:1 by , 12 years ago
Resolution: | → needsinfo |
---|---|
Status: | new → closed |
by , 12 years ago
Attachment: | TemplateDoesNotExist at admin .html added |
---|
admin - template does not exist
comment:2 by , 12 years ago
Resolution: | needsinfo |
---|---|
Status: | closed → reopened |
We recently upgraded from django 1.3 to django 1.4. I updated the manage.py and am also using the wsgi.py as recommended in the release notes. We deploy to apache using mod_wsgi on our servers and use manage.py runserver locally. Locally we get errors when trying to render the admin pages. However on apache using mod_wsgi the admin pages work. Django error page attached "TemplateDoesNotExist at admin .html".
comment:3 by , 12 years ago
Resolution: | → invalid |
---|---|
Status: | reopened → closed |
The attached traceback html file shows:
Environment: Request Method: GET Request URL: http://localhost:8000/admin/ Django Version: 1.4 Python Version: 2.7.2 Installed Applications: ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.admin', 'customers', 'keyerror_django_client', 'django_jenkins') Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'middleware_console_error_messages.ConsoleExceptionMiddleware') Template Loader Error: Django tried loading these templates, in this order: Using loader django.template.loaders.filesystem.Loader: /media/data/work/clean/rmsagit/customers/templates/admin/index.html (File does not exist) Using loader django.template.loaders.app_directories.Loader: /media/data/work/clean/rmsagit/customers/templates/admin/index.html (File does not exist) Traceback: File "/media/data/work/clean/rmsagit/django/core/handlers/base.py" in get_response 136. response = response.render() File "/media/data/work/clean/rmsagit/django/template/response.py" in render 104. self._set_content(self.rendered_content) File "/media/data/work/clean/rmsagit/django/template/response.py" in rendered_content 79. template = self.resolve_template(self.template_name) File "/media/data/work/clean/rmsagit/django/template/response.py" in resolve_template 55. return loader.select_template(template) File "/media/data/work/clean/rmsagit/django/template/loader.py" in select_template 193. raise TemplateDoesNotExist(', '.join(not_found)) Exception Type: TemplateDoesNotExist at /admin/ Exception Value: admin/index.html
admin/index.html does certainly exist in 1.4 (https://github.com/django/django/blob/1.4/django/contrib/admin/templates/admin/index.html)
The template loader postmortem reports:
Django tried loading these templates, in this order: Using loader django.template.loaders.filesystem.Loader: /media/data/work/clean/rmsagit/customers/templates/admin/index.html (File does not exist) Using loader django.template.loaders.app_directories.Loader: /media/data/work/clean/rmsagit/customers/templates/admin/index.html (File does not exist)
This postmortem isn't showing that /media/data/work/clean/rmsagit/django/contrib/admin/templates/admin/index.html
was tried, which implies the directory /media/data/work/clean/rmsagit/django/contrib/admin/templates/
does not exist. /media/data/work/clean/rmsagit/django
is an odd place for Django to be installed. How did Django get there and is it possible that the method used did not properly copy all the source files?
Accesing admin certainly works in Django 1.4, and certainly works for projects updated from 1.3 (I've done that). Closing invalid since it seems likely the problem here has to do with how Django was "installed".
Unfortunately this report is unreadable.
Please re-open it only if you are willing to paste a full and properly formatted traceback in a further comment and to use the preview button before posting it so you are sure people will be able to read it.