Published on May 21, 2023Go home
Deregistering models from the Django Admin Panel
To deregister the built-in django User and Group models add the following snippet your project's
urls.py where the admin site resource is registered.
from django.urls import path from django.contrib import admin from django.contrib.auth import models as auth_models admin.site.unregister(auth_models.User) admin.site.unregister(auth_models.Group) urlpatterns = [ path("admin/", admin.site.urls), ]