Django: Nonelogout in admins

After upgrading to Django 1.2, I have weird URLs in my admin panel. They look like this:

http://example.com/admin/Nonelogout/

or

http://example.com/admin/Nonepassword_change/

What could happen during the migration and what do I need to fix?

I found in the django source that it is called root_path, but I have no idea where I can install it correctly or if I have to do it.

Part of my urls.py for admin looks like this:

(r'^admin/doc/', include('django.contrib.admindocs.urls')),
# (r'^admin/(.*)', admin.site.root),
(r'^admin/', include(admin.site.urls)),
+3
source share
1 answer

If you did not find an answer for this, here is what I did ... (and it’s a hack, but this is the only thing that made it work).

In urls.py:

admin.site.root_path = ''

But I would be glad to see someone come out with a better solution.

+1
source

Source: https://habr.com/ru/post/1751411/


All Articles