[Django]-How to correct this error: "'Adminsite' object has no attribute 'root'"

59👍

Your url for admin should be:
url(r'^admin/', include(admin.site.urls))
not (r'^admin/(.*)', admin.site.root)
– it’s for Django 1.0. For Django 1.3 it wouldn’t work.

2👍

Another possible issue here, which I encountered, is that admin has not been properly configured in the settings.py file. Anyone having this issue would want to check that their installed apps include django.contrib.admin. Reference https://docs.djangoproject.com/en/1.3/faq/admin/ for details.

Leave a comment