project/kiwipycon/registration/admin.py
changeset 65 282cd6aa9fd8
parent 1 fda1c66b25f9
child 66 fdcf8ee37f4e
--- a/project/kiwipycon/registration/admin.py	Sat Dec 12 03:04:07 2009 +0530
+++ b/project/kiwipycon/registration/admin.py	Sat Dec 12 03:18:18 2009 +0530
@@ -9,7 +9,7 @@
 from .models import Wifi
 
 class RegistrationAdmin(admin.ModelAdmin):
-    list_display = ('registrant', 'slug', 'email', 'city', 
+    list_display = ('registrant', 'full_name', 'slug', 'email', 'city', 
             'organisation', 'occupation', 'postcode',
             'tshirt', 'conference', 'tutorial', 'sprint',
             'allow_contact')
@@ -23,9 +23,13 @@
         }),
     )
 
+    search_fields = ['registrant__username', 'registrant__email']
+
     def email(self, obj):
         return obj.registrant.email
 
+    def full_name(self, obj):
+        return obj.registrant.get_full_name()
 
 admin.site.register(Registration, RegistrationAdmin)