8

i created a superuser account , but when I log in with it , i can't edit any of the installed applications !

how can I grant permissions for this user to allow editing applications ??

Adham
  • 63,550
  • 98
  • 229
  • 344

4 Answers4

11

Try adding the line admin.autodiscover() to your main urls.py, making sure to do from django.contrib import admin first.

see this answer

Community
  • 1
  • 1
UXE
  • 2,374
  • 2
  • 18
  • 17
3

Found this info useful in this context.

So simply replace django.contrib.admin with django.contrib.admin.apps.SimpleAdminConfig in installed apps.

from adminplus.sites import AdminSitePlus

#Add this line.  
admin.site = AdminSitePlus()
admin.autodiscover()  # automatic autodiscover should be turned off in settings
nuhbye
  • 89
  • 1
  • 5
1

I had this problem happen upgrading from Django 1.6 -> 1.8. The solution for me turned out to be simply removing admin.site = AdminSitePlus() from the top of my urls.py. So, this:

admin.site = AdminSitePlus()
admin.autodiscover()

became this:

admin.autodiscover()
Bobby
  • 6,840
  • 1
  • 22
  • 25
1

Have you created admin.py files for all your apps, registered the models, and called admin.site.register() in urls.py?

Daniel Roseman
  • 588,541
  • 66
  • 880
  • 895