Enabled admin interface. anoop
authorMadhusudan.C.S <madhusudancs@gmail.com>
Fri, 06 Aug 2010 16:17:02 +0530
branchanoop
changeset 222 443bbd61e84b
parent 221 b0fd3cb56e0b
child 223 b67b2d5cfdd8
Enabled admin interface.
sdi/admin.py
urls.py
--- a/sdi/admin.py	Fri Aug 06 15:11:47 2010 +0530
+++ b/sdi/admin.py	Fri Aug 06 16:17:02 2010 +0530
@@ -1,5 +1,26 @@
 from django.contrib import admin
 
+from sage_days.sdi.models import ParticipantInfo
 from sage_days.sdi.models import Registrant
+from sage_days.sdi.models import RegistrantInfo
+
+
+class RegistrantAdmin(admin.ModelAdmin):
+    list_display = ('first_name', 'last_name')
+    list_filter = ('first_name', 'last_name')
+    search_fields = ('first_name', 'last_name')
+admin.site.register(Registrant, RegistrantAdmin)
+
 
-admin.site.register(Registrant)
+class ParticipantInfoAdmin(admin.ModelAdmin):
+    list_display = ('participant', 'has_laptop_for_sagedays', 'sprinted_already', 'will_sprint') 
+    list_filter = ('participant', 'has_laptop_for_sagedays', 'sprinted_already', 'will_sprint')
+    search_fields = ('participant', 'has_laptop_for_sagedays', 'sprinted_already', 'will_sprint')
+admin.site.register(ParticipantInfo, ParticipantInfoAdmin)
+
+
+class RegistrantInfoAdmin(admin.ModelAdmin):
+    list_display = ('registrant', 'status_of_attending_sagedays', 'status_of_attending_workshop', 'status_of_accomodation', 'has_laptop_for_workshop', 'acco_location')
+    list_filter = ('registrant', 'status_of_attending_sagedays', 'status_of_attending_workshop', 'status_of_accomodation', 'has_laptop_for_workshop', 'acco_location')
+    search_fields = ('registrant', 'status_of_attending_sagedays', 'status_of_attending_workshop', 'status_of_accomodation', 'has_laptop_for_workshop', 'acco_location')
+admin.site.register(RegistrantInfo, RegistrantInfoAdmin)
--- a/urls.py	Fri Aug 06 15:11:47 2010 +0530
+++ b/urls.py	Fri Aug 06 16:17:02 2010 +0530
@@ -17,7 +17,7 @@
     # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
 
     # Uncomment the next line to enable the admin:
-    # (r'^administration/', include(admin.site.urls)),
+    (r'^administration/', include(admin.site.urls)),
     (r'^$',homepage),
     (r'^schedule/',schedule),
     (r'^organizers/',organizers),