-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
How to remove default apps from Django admin?
- Loading branch information
Showing
5 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,22 @@ | ||
How to remove default apps from Django admin? | ||
=========================================================== | ||
|
||
Django will include :code:`django.contrib.auth` in :code:`INSTALLED_APPS`, | ||
which means `User` and `Groups` models are included in admin automatically. | ||
|
||
.. image:: 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. | ||
|
||
|
||
.. image:: images/remove_default_apps_fixed.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters