Reputation: 550
Suddenly django admin couldn't find login template.
When accessing /admin/ it raises TemplateDoesNotExist
.
Strange thing is that it searches for admin/login.html.html
that, obviously, does not exist in any of paths supplied.
Any idea where does it add the extra .html
?
EDIT:
url.py:
from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^admin/', include(admin.site.urls)),
url(r'^$', include('dashboard.urls')),
)
Traceback:
Internal Server Error: /admin/
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 140, in get_response
response = response.render()
File "/usr/local/lib/python2.7/dist-packages/django/template/response.py", line 105, in render
self.content = self.rendered_content
File "/usr/local/lib/python2.7/dist-packages/django/template/response.py", line 80, in rendered_content
template = self.resolve_template(self.template_name)
File "/usr/local/lib/python2.7/dist-packages/django/template/response.py", line 58, in resolve_template
return loader.get_template(template)
File "/usr/local/lib/python2.7/dist-packages/django/template/loader.py", line 146, in get_template
template, origin = find_template(template_name)
File "/usr/local/lib/python2.7/dist-packages/django/template/loader.py", line 139, in find_template
raise TemplateDoesNotExist(name)
TemplateDoesNotExist: admin/login.html.html
[04/Nov/2013 16:55:11] "GET /admin/ HTTP/1.1" 500 74150
Core is the module that contains settings.py, urls.py and models.py (core models, that are project-wide)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'core',
'dashboard',
'south',
)
Upvotes: 0
Views: 1639
Reputation: 550
Appears that coworkers had added middleware that should handle RESTful requests and messes with the template loader. So there was the problem.
Upvotes: 1