X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/99f6dd4f1ff0390de9a9bbd4e3352b953cb9a235..ae60b2a3949e96357477cc04f90fd0873cee8a92:/apps/polls/forms.py?ds=sidebyside diff --git a/apps/polls/forms.py b/apps/polls/forms.py deleted file mode 100644 index fba346853..000000000 --- a/apps/polls/forms.py +++ /dev/null @@ -1,14 +0,0 @@ -# -*- 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 import forms - - -class PollForm(forms.Form): - vote = forms.ChoiceField(widget = forms.RadioSelect) - - def __init__(self, *args, **kwargs): - poll = kwargs.pop('poll', None) - super(PollForm, self).__init__(*args, **kwargs) - self.fields['vote'].choices = [(item.id, item.content) for item in poll.items.all()]