Re: Overriding fForm class __init__ method

2010-06-16 Thread DevelopsDjangoApps
Thanks a lot. Your solution was the right one. However, I just needed to provide 'pid' as the only argument for the pop method. Now when I use the following command in my view it doesn't give me any error: form = VoteRadioForm(request.POST, pid = 2 ) However, I'm having a problem with form valid

Re: Overriding fForm class __init__ method

2010-06-16 Thread Daniel Roseman
On Jun 16, 10:30 am, DevelopsDjangoApps wrote: > Hi, > > I have created a form class like this: > > class VoteRadioForm(forms.Form): > >     choices = > forms.ModelChoiceField(queryset=Choice.objects.filter(poll__active= > True, poll__id = 2), >                                empty_label= None, >

Overriding fForm class __init__ method

2010-06-16 Thread DevelopsDjangoApps
Hi, I have created a form class like this: class VoteRadioForm(forms.Form): choices = forms.ModelChoiceField(queryset=Choice.objects.filter(poll__active= True, poll__id = 2), empty_label= None, widget= forms.RadioSelect, ) T