Unknown field(s) (username) specified for User. Check fields/fieldsets/exclude attributes of class CustomUserAdmin
Remove UserAdmin.add_fieldsets +
This means expand original fieldsets that includes original username. Since your custom user model does not have username, it gives error.
It works for me after adding the following code in my app/admin.py
CustomeUserAdmin
Class:
add_fieldsets = (
(None, {
'classes': ('wide',),
'fields': ('email', 'first_name', 'last_name', 'password1', 'password2'),
}),
)
Replace in the fields regarding your customization.
For more, read the docs.