I've been getting this error:
The requested admin page does not exist.
I've got a view at the URL /members/
which is protected by @login_required
. When I'm not logged-in and visit the /members/
URL, I get redirected to:
http://127.0.0.1:8000/admin/login/?next=/members/
When I enter my login credentials and click "Log in", I get that error (only when DEBUG
is True
, otherwise I get a 404), and I'm still at the address:
http://127.0.0.1:8000/admin/login/?next=/members/
Some comments I've found about this seem to be to do with the order in which I add bits to my urlpatterns
, but that doesn't seem to make any difference.
Any other ideas?
My urls.py
looks roughly like this:
urlpatterns = patterns('',
(r'^$', 'myproject.views.homepage', {}, 'homepage'),
# some other stuff
)
urlpatterns += patterns('',
(r'^members/', include('members.urls', namespace = u'members', app_name = u'members')),
)
urlpatterns += patterns('',
(r'^admin/', include(admin.site.urls)),
)
Let me know if there's anything else that might help me work out what's wrong!