I am trying to change the Users view in Django Admin to show different fields (now it shows by default: username, email address, first name, last name, staff status) I have tried this in the admin.py file:
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models import User
# Register your models here.
UserAdmin.list_display = ['email', 'first_name', 'last_name', 'is_active', 'last_login']
admin.site.unregister(User)
admin.site.register(User, UserAdmin)
However I cannot get my admin Users view to change. Is there anything else I need to do? I am using Django 2.0
MyUserAdmin
inherit fromdjango.contrib.auth.admin.UserAdmin
? – Kordofan