[damned-lies] Show last_login field in User admin



commit 089e4d88a9bccead2f7f764f84200534ce978689
Author: Claude Paroz <claude 2xlibre net>
Date:   Sun Oct 24 21:21:08 2010 +0200

    Show last_login field in User admin

 people/admin.py |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/people/admin.py b/people/admin.py
index 22c7bd6..c80e097 100644
--- a/people/admin.py
+++ b/people/admin.py
@@ -1,8 +1,15 @@
 from django.contrib import admin
+from django.contrib.auth.admin import UserAdmin
+from django.contrib.auth.models import User
 from people.models import Person
 
 class PersonAdmin(admin.ModelAdmin):
     search_fields = ('username', 'first_name', 'last_name')
     list_display = ('username', 'first_name', 'last_name', 'email')
 
+UserAdmin.list_display = ('username', 'email', 'last_name', 'first_name', 'is_active', 'last_login')
+
+admin.site.unregister(User)
+admin.site.register(User, UserAdmin)
+
 admin.site.register(Person, PersonAdmin)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]