~widelands-dev/widelands-website/trunk

« back to all changes in this revision

Viewing changes to wlpoll/admin.py

  • Committer: Holger Rapp
  • Date: 2009-02-26 22:38:49 UTC
  • Revision ID: sirver@kallisto.local-20090226223849-1563ij0uuw0lz0zu
First version of widelands online help

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/env python -tt
2
 
# encoding: utf-8
3
 
#
4
 
 
5
 
from models import Poll, Choice
6
 
from django.contrib import admin
7
 
 
8
 
class ChoiceInline(admin.TabularInline):
9
 
    model = Choice
10
 
    extra = 10
11
 
 
12
 
class PollAdmin(admin.ModelAdmin):
13
 
    inlines = [ ChoiceInline ]
14
 
    
15
 
    search_fields = [ "name" ]
16
 
    list_display = ["name", "pub_date"]
17
 
    list_filter = [ "pub_date" ]
18
 
 
19
 
admin.site.register(Poll, PollAdmin)
20
 
 
21