fixes to vierwer/folding catalogue in menu
[wolnelektury.git] / apps / polls / forms.py
1 from django import forms\r
2 \r
3 \r
4 class PollForm(forms.Form):\r
5     vote = forms.ChoiceField(widget = forms.RadioSelect)\r
6     \r
7     def __init__(self, *args, **kwargs):
8         poll = kwargs.pop('poll', None)\r
9         super(PollForm, self).__init__(*args, **kwargs)\r
10         self.fields['vote'].choices = [(item.id, item.content) for item in poll.items.all()]