[Fixed]-Django Custom User Model errors ((admin.E108) The value of 'list_display[2]' refers to 'first_name', which is not a callable

14👍

There is a typo in your admin class as you are not overriding the default list_display option which contains first_name. It should be list_display instead of List_display inside UserAdmin:

class UserAdmin(BaseUserAdmin):
    add_form =  UserCreationForm

    list_display = ('username', 'email', 'is_admin')
    list_filter = ('is_admin',)

    fieldsets = (
        (None, {'fields': ('username', 'email','password')}),

        ('Permissions', {'fields': ('is_admin',)}),
    )

    search_fields =  ('username', 'email')
    ordering = ('username','email')

    filter_horizontal = ()

admin.site.register(MyUser,UserAdmin)

Leave a comment