In the Django Admin, is there any way to hide the "Auth" section? Assuming this is a clean installation of Django and barebones project with no apps, only admin.
Asked
Active
Viewed 1.4k times
1 Answers
73
You can use admin.site.unregister
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
from django.contrib.auth.models import Group
admin.site.unregister(User)
admin.site.unregister(Group)
admin.site.unregister(Site)

dting
- 38,604
- 10
- 95
- 114
-
another side-question is where to put that code ? – Jocelyn delalande Feb 19 '14 at 08:55
-
1@Jocelyndelalande Usually, you'd have an `admin.py` file in you apps package. But it is also possible to add it to the `models.py` file – J. Ghyllebert Mar 12 '14 at 15:23