fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Simple upgrades.
[wolnelektury.git]
/
apps
/
polls
/
forms.py
diff --git
a/apps/polls/forms.py
b/apps/polls/forms.py
index
f9ca907
..
20d53fe
100644
(file)
--- a/
apps/polls/forms.py
+++ b/
apps/polls/forms.py
@@
-1,10
+1,14
@@
+# -*- coding: utf-8 -*-
\r
+# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
\r
+# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
\r
+#
\r
from django import forms
\r
\r
\r
class PollForm(forms.Form):
\r
from django import forms
\r
\r
\r
class PollForm(forms.Form):
\r
- vote = forms.ChoiceField(widget
=
forms.RadioSelect)
\r
-
\r
+ vote = forms.ChoiceField(widget
=
forms.RadioSelect)
\r
+
\r
def __init__(self, *args, **kwargs):
poll = kwargs.pop('poll', None)
\r
super(PollForm, self).__init__(*args, **kwargs)
\r
def __init__(self, *args, **kwargs):
poll = kwargs.pop('poll', None)
\r
super(PollForm, self).__init__(*args, **kwargs)
\r
- self.fields['vote'].choices = [(item.id, item.content) for item in poll.items.all()]
\ No newline at end of file
+ self.fields['vote'].choices = [(item.id, item.content) for item in poll.items.all()]
\r