1 # This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
4 from django.contrib import admin
6 from .models import Poll, PollItem
9 class PollItemInline(admin.TabularInline):
12 readonly_fields = ('vote_count',)
15 class PollAdmin(admin.ModelAdmin):
16 inlines = [PollItemInline]
19 class PollItemAdmin(admin.ModelAdmin):
20 readonly_fields = ('vote_count',)
23 admin.site.register(Poll, PollAdmin)
24 admin.site.register(PollItem, PollItemAdmin)