sdi/admin.py
author nishanth
Fri, 03 Sep 2010 16:23:17 +0530
branchanoop
changeset 241 ac1f13b2b3dc
parent 222 443bbd61e84b
permissions -rw-r--r--
included the url
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
17
ee98a9b44ef9 moved admin.py to correct location
nishanth
parents:
diff changeset
     1
from django.contrib import admin
ee98a9b44ef9 moved admin.py to correct location
nishanth
parents:
diff changeset
     2
222
443bbd61e84b Enabled admin interface.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 17
diff changeset
     3
from sage_days.sdi.models import ParticipantInfo
17
ee98a9b44ef9 moved admin.py to correct location
nishanth
parents:
diff changeset
     4
from sage_days.sdi.models import Registrant
222
443bbd61e84b Enabled admin interface.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 17
diff changeset
     5
from sage_days.sdi.models import RegistrantInfo
443bbd61e84b Enabled admin interface.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 17
diff changeset
     6
443bbd61e84b Enabled admin interface.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 17
diff changeset
     7
443bbd61e84b Enabled admin interface.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 17
diff changeset
     8
class RegistrantAdmin(admin.ModelAdmin):
443bbd61e84b Enabled admin interface.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 17
diff changeset
     9
    list_display = ('first_name', 'last_name')
443bbd61e84b Enabled admin interface.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 17
diff changeset
    10
    list_filter = ('first_name', 'last_name')
443bbd61e84b Enabled admin interface.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 17
diff changeset
    11
    search_fields = ('first_name', 'last_name')
443bbd61e84b Enabled admin interface.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 17
diff changeset
    12
admin.site.register(Registrant, RegistrantAdmin)
443bbd61e84b Enabled admin interface.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 17
diff changeset
    13
17
ee98a9b44ef9 moved admin.py to correct location
nishanth
parents:
diff changeset
    14
222
443bbd61e84b Enabled admin interface.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 17
diff changeset
    15
class ParticipantInfoAdmin(admin.ModelAdmin):
443bbd61e84b Enabled admin interface.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 17
diff changeset
    16
    list_display = ('participant', 'has_laptop_for_sagedays', 'sprinted_already', 'will_sprint') 
443bbd61e84b Enabled admin interface.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 17
diff changeset
    17
    list_filter = ('participant', 'has_laptop_for_sagedays', 'sprinted_already', 'will_sprint')
443bbd61e84b Enabled admin interface.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 17
diff changeset
    18
    search_fields = ('participant', 'has_laptop_for_sagedays', 'sprinted_already', 'will_sprint')
443bbd61e84b Enabled admin interface.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 17
diff changeset
    19
admin.site.register(ParticipantInfo, ParticipantInfoAdmin)
443bbd61e84b Enabled admin interface.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 17
diff changeset
    20
443bbd61e84b Enabled admin interface.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 17
diff changeset
    21
443bbd61e84b Enabled admin interface.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 17
diff changeset
    22
class RegistrantInfoAdmin(admin.ModelAdmin):
443bbd61e84b Enabled admin interface.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 17
diff changeset
    23
    list_display = ('registrant', 'status_of_attending_sagedays', 'status_of_attending_workshop', 'status_of_accomodation', 'has_laptop_for_workshop', 'acco_location')
443bbd61e84b Enabled admin interface.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 17
diff changeset
    24
    list_filter = ('registrant', 'status_of_attending_sagedays', 'status_of_attending_workshop', 'status_of_accomodation', 'has_laptop_for_workshop', 'acco_location')
443bbd61e84b Enabled admin interface.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 17
diff changeset
    25
    search_fields = ('registrant', 'status_of_attending_sagedays', 'status_of_attending_workshop', 'status_of_accomodation', 'has_laptop_for_workshop', 'acco_location')
443bbd61e84b Enabled admin interface.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 17
diff changeset
    26
admin.site.register(RegistrantInfo, RegistrantInfoAdmin)