darklow / django-suit

Modern theme for Django admin interface
http://djangosuit.com/
Other
2.31k stars 701 forks source link

Django Admin Hide Superuser User #776

Open chetan-pixel opened 3 years ago

chetan-pixel commented 3 years ago

I have 2 superusers in my django admin site. I want to do that second superadmin and other staff members cant see me in the list of users.

Django Admin Hide A User Whose username = chetan I am using 3.13 version of django.

I got answer at this link but it didnt worked at all. https://stackoverflow.com/questions/44229058/django-is-there-any-way-to-hide-superusers-from-the-user-list

gamesbook commented 3 years ago

Suggest you override the default Manager for the users (assuming you are using a CustomUser class): https://docs.djangoproject.com/en/3.1/topics/db/managers/#default-managers