Re: How do I define choices in ChoiceField

2009-03-27 Thread Joshua Partogi
Thanks for the hints guys. It works now. :-) On Mar 28, 12:49 am, Stephan John wrote: > Am Freitag, 27. März 2009 14:43:08 schriebJoshuaPartogi: > > > bel = forms.ChoiceField(choices=({'one':'one','two':'two'}) ) > > it must be tuples: > > bel = forms.ChoiceField(choices=(('one', 'one'), ('two'

Re: How do I define choices in ChoiceField

2009-03-27 Thread Briel
Hi. Choices is a tuple/list of tuples/lists, so in your case it would look like this: (('one', 'one'), ('two', 'two')) You can't use dictionaries. ~Jakob On 27 Mar., 14:43, Joshua Partogi wrote: > Hi all, > > Let me just get straight to the point > I tried these: > label = forms.ChoiceField(cho

Re: How do I define choices in ChoiceField

2009-03-27 Thread Stephan John
Am Freitag, 27. März 2009 14:43:08 schrieb Joshua Partogi: > bel = forms.ChoiceField(choices=({'one':'one','two':'two'}) ) it must be tuples: bel = forms.ChoiceField(choices=(('one', 'one'), ('two', 'two' ) ) --~--~-~--~~~---~--~~ You received this message becau

How do I define choices in ChoiceField

2009-03-27 Thread Joshua Partogi
Hi all, Let me just get straight to the point I tried these: label = forms.ChoiceField(choices=({'one':'one','two':'two'}) ) And received these: Exception Type: TemplateSyntaxError Exception Value:Caught an exception while rendering: too many values to unpack What was wrong wit