1👍
✅
Your admin.py needs to be within an actual django app, i.e. something that’s in your INSTALLED_APPS
setting. The code you’ve posted should work fine.
Edit: for future reference the issue was another app altering the user admin.
👤Greg
0👍
Please be explanatory if you want to remove those fields from list_display or edit form and you can try
exclude = (‘is_staff’, ‘is_superuser’)
This should do the trick.
Source:stackexchange.com