Django will include
django.contrib.auth
in INSTALLED_APPS
, which means User and Groups models are included in admin automatically.![_images/remove_default_apps.png](https://books.agiliq.com/projects/django-admin-cookbook/en/latest/_images/remove_default_apps.png)
If you want to remove it, you will have to unregister them.
from django.contrib.auth.models import User, Group
admin.site.unregister(User)
admin.site.unregister(Group)
After making these changes, your admin should look like this.
![_images/remove_default_apps_fixed.png](https://books.agiliq.com/projects/django-admin-cookbook/en/latest/_images/remove_default_apps_fixed.png)
No comments:
Post a Comment