~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to wlpoll/admin.py

  • Committer: franku
  • Date: 2016-04-18 13:29:23 UTC
  • mto: This revision was merged to the branch mainline in revision 409.
  • Revision ID: somal@arcor.de-20160418132923-bfzkb5mvdr7l8mz4
added migrations to each app

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