Mercurial > public > sg101
view gpp/polls/forms.py @ 279:879d39647064
Added the text class to the search input box to let blueprints css style it. Fixed invalid HTML problem with the forum last post info tag.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 03 Oct 2010 00:28:23 +0000 |
parents | dbd703f7d63a |
children | 1f139de929c4 |
line wrap: on
line source
"""Forms for the Polls application.""" from django import forms from polls.models import Choice class VoteForm(forms.Form): """Form for voting in a poll.""" choices = forms.ModelChoiceField(label='', empty_label=None, queryset=Choice.objects.none(), widget=forms.RadioSelect) def __init__(self, poll, *args, **kwargs): super(VoteForm, self).__init__(*args, **kwargs) self.fields['choices'].queryset = poll.choice_set.all()