Mercurial > public > sg101
annotate gpp/polls/admin.py @ 11:cc8eb028def1
Update jquery-ui and theme version that is hosted on google. In preparation for having jquery on every page (?), make it so that the autocomplete plug is using the 'global' jquery, and not the one that came with it. It seems to work okay with jquery 1.3.2.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Tue, 14 Apr 2009 02:35:35 +0000 |
parents | dbd703f7d63a |
children | 1f139de929c4 |
rev | line source |
---|---|
gremmie@1 | 1 ''' |
gremmie@1 | 2 This file contains the automatic admin site definitions for the polls models. |
gremmie@1 | 3 ''' |
gremmie@1 | 4 |
gremmie@1 | 5 from django.contrib import admin |
gremmie@1 | 6 from polls.models import Poll |
gremmie@1 | 7 from polls.models import Choice |
gremmie@1 | 8 |
gremmie@1 | 9 |
gremmie@1 | 10 class ChoiceInline(admin.TabularInline): |
gremmie@1 | 11 model = Choice |
gremmie@1 | 12 extra = 3 |
gremmie@1 | 13 |
gremmie@1 | 14 |
gremmie@1 | 15 class PollAdmin(admin.ModelAdmin): |
gremmie@1 | 16 list_display = ('question', 'start_date', 'end_date', 'is_enabled') |
gremmie@1 | 17 inlines = (ChoiceInline, ) |
gremmie@1 | 18 list_filter = ('start_date', 'end_date') |
gremmie@1 | 19 search_fields = ('question', ) |
gremmie@1 | 20 date_hierarchy = 'start_date' |
gremmie@1 | 21 |
gremmie@1 | 22 |
gremmie@1 | 23 admin.site.register(Poll, PollAdmin) |