Added Wifi for admin page.
authorMadhusudan.C.S <madhusudancs@gmail.com>
Sat, 12 Dec 2009 09:55:13 +0530
changeset 66 fdcf8ee37f4e
parent 65 282cd6aa9fd8
child 67 48454b116b66
Added Wifi for admin page.
project/kiwipycon/registration/admin.py
--- a/project/kiwipycon/registration/admin.py	Sat Dec 12 03:18:18 2009 +0530
+++ b/project/kiwipycon/registration/admin.py	Sat Dec 12 09:55:13 2009 +0530
@@ -9,10 +9,10 @@
 from .models import Wifi
 
 class RegistrationAdmin(admin.ModelAdmin):
-    list_display = ('registrant', 'full_name', 'slug', 'email', 'city', 
-            'organisation', 'occupation', 'postcode',
-            'tshirt', 'conference', 'tutorial', 'sprint',
-            'allow_contact')
+    list_display = ('registrant', 'full_name', 'laptop', 'slug',
+            'email', 'city', 'organisation', 'occupation',
+            'postcode', 'tshirt', 'conference', 'tutorial',
+            'sprint', 'allow_contact')
     fieldsets = (
         ('Details', {
             'fields': ('slug', 'registrant', 'organisation', 'occupation',
@@ -31,6 +31,9 @@
     def full_name(self, obj):
         return obj.registrant.get_full_name()
 
+    def laptop(self, obj):
+        return obj.registrant.wifi_set.values()[0]['wifi']
+
 admin.site.register(Registration, RegistrationAdmin)
 
 class WifiAdmin(admin.ModelAdmin):