~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to wlpoll/admin.py

  • Committer: Holger Rapp
  • Date: 2016-08-08 10:06:42 UTC
  • mto: This revision was merged to the branch mainline in revision 419.
  • Revision ID: sirver@gmx.de-20160808100642-z62vwqitxoyl5fh4
Added the apt-get update script I run every 30 days.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
from models import Poll, Choice
6
6
from django.contrib import admin
7
7
 
8
 
 
9
8
class ChoiceInline(admin.TabularInline):
10
9
    model = Choice
11
10
    extra = 10
12
11
 
13
 
 
14
12
class PollAdmin(admin.ModelAdmin):
15
 
    inlines = [ChoiceInline]
16
 
 
17
 
    search_fields = ['name']
18
 
    list_display = ['name', 'pub_date']
19
 
    list_filter = ['pub_date']
 
13
    inlines = [ ChoiceInline ]
 
14
    
 
15
    search_fields = [ "name" ]
 
16
    list_display = ["name", "pub_date"]
 
17
    list_filter = [ "pub_date" ]
20
18
 
21
19
admin.site.register(Poll, PollAdmin)
 
20
 
 
21