fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Minor fixes in picture publishing process.
[wolnelektury.git]
/
apps
/
polls
/
admin.py
diff --git
a/apps/polls/admin.py
b/apps/polls/admin.py
index
29fc0aa
..
235e8f3
100644
(file)
--- a/
apps/polls/admin.py
+++ b/
apps/polls/admin.py
@@
-1,21
+1,25
@@
+# -*- coding: utf-8 -*-
+# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
+# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
+#
from django.contrib import admin
from django.contrib import admin
-from models import Poll, PollItem
+from
.
models import Poll, PollItem
class PollItemInline(admin.TabularInline):
model = PollItem
extra = 0
readonly_fields = ('vote_count',)
class PollItemInline(admin.TabularInline):
model = PollItem
extra = 0
readonly_fields = ('vote_count',)
-
-
+
+
class PollAdmin(admin.ModelAdmin):
inlines = [PollItemInline]
class PollAdmin(admin.ModelAdmin):
inlines = [PollItemInline]
-
+
class PollItemAdmin(admin.ModelAdmin):
readonly_fields = ('vote_count',)
class PollItemAdmin(admin.ModelAdmin):
readonly_fields = ('vote_count',)
-
-
+
+
admin.site.register(Poll, PollAdmin)
admin.site.register(Poll, PollAdmin)
-admin.site.register(PollItem, PollItemAdmin)
\ No newline at end of file
+admin.site.register(PollItem, PollItemAdmin)