python - How to customize Django admin page of Users -


i trying customize django (version 1.8) admin page of users (which under authentication , authorization on admin page), cannot work.

currently, default admin page of users shows 5 defaults fields: username, email address, first name, last name, staff status. and, trying make admin users page show following fields: username, email. date_joined, last_login

so, created admin.py file , saved in directory wsgi.py following code:

class useradmin(admin.modeladmin):     list_display = ("username", "email", "date_joined", "last_login")     class meta:         model = user  admin.site.unregister(user) admin.site.register(user, useradmin) 

but, code above did not force admin user page display fields want display("username", "email", "date_joined", "last_login").

then, replaced code above following code in admin.py:

class myuseradmin(useradmin):     list_display = ("username", "email", "date_joined", "last_login")  admin.site.unregister(user) admin.site.register(user, myuseradmin) 

but, no luck. there similar question on stackoverflow , answers (how customize auth.user admin page in django crud?), , above 2 blocks of code trying after reading answers. but, still cannot work.

can me?

i found out problem was. problem did not include app in installed_apps in settings.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -