I get this error when trying to access my admin panel after upgrading to Django 1.4 - error:
NoReverseMatch at /admin/ Reverse for 'logout' with arguments '()' and keyword arguments '{}' not found.
My best guess is that I am defining a logout URL that somehow contradicts the one the admin panel is trying to create. Although, it should be creating / admin / logout, right? I upgraded ADMIN_MEDIA_PREFIX to STATIC_URL and moved them to a subfolder named admin, but that didn't seem to change the situation.
In my urls.py, I have:
from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', ... ('^logout/$', RedirectView.as_view(url='/login/index.html')), (r'^login/(?P<path>.*)$', 'django.views.static.serve', {'document_root': '/fullpath/to/media/login'}), (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': '/fullpath/to/media/static'}), (r'^admin/(.*)', include(admin.site.urls)), )
And in my settings.py I have:
STATIC_ROOT = '/fullpath/to/myapp/media/static/' STATIC_URL = '/static/' INSTALLED_APPS = ( 'django.contrib.auth', ... 'django.contrib.admin', )
source share