98c27fec85
Perform a bulk rename/move of many files and folders: paths previously prefixed with '01', '02', '03', '04', etc. were relocated to equivalent paths prefixed with '8'. Changes are path-only (R100 renames) and do not modify file contents; this reorganizes the repository structure.
21 lines
619 B
Python
21 lines
619 B
Python
from django.contrib import admin
|
|
|
|
class ChoiceInline(admin.TabularInline):
|
|
model = Choice
|
|
extra = 2
|
|
|
|
admin.site.register(Choice)
|
|
# Register your models here.
|
|
class QuestionAdmin(admin.ModelAdmin):
|
|
list_display = ('question_text', 'pub_date')
|
|
list_display_links = ('question_text', 'pub_date')
|
|
search_fields = ('question_text',)
|
|
|
|
admin.site.register(Question, QuestionAdmin)
|
|
|
|
class ChoiceAdmin(admin.ModelAdmin):
|
|
list_display = ('choice_text', 'question', 'votes')
|
|
list_display_links = ('choice_text', 'question')
|
|
search_fields = ('choice_text',)
|
|
admin.site.register(Choice, ChoiceAdmin)
|