By default, in Django-admin there is Users, Groups, and Sites apps. How can I remove Groups and Sites?
I tried to remove admin.autodiscover() from root
Loop through all apps, and unregister any models they have registered.
from django.apps import apps
# De-register all models from other apps
for app_config in apps.get_app_configs():
for model in app_config.get_models():
if admin.site.is_registered(model):
admin.site.unregister(model)
# Register only those models you want
...