You need to import your custom user model, not the original version of django.contrib.auth.models.User.
So that should only work with
from django.contrib.auth.admin import UserAdmin from myapp.models import CustomUser admin.site.register(CustomUser, UserAdmin)
in your admin.py
source share