from django.contrib.auth.models import User
class UserAdmin(admin.ModelAdmin):
list_display = ('email', 'first_name', 'last_name')
list_filter = ('is_staff', 'is_superuser')
admin.site.unregister(User)
admin.site.register(User, UserAdmin)
We need to unregister before register custom UserAdmin because in django User Model Admin already registered, So we need to firstly unregister User Model in our admin.py then we can register User Model with custom ModelAdmin