El lun, 23-04-2007 a las 21:22 +1000, Malcolm Tredinnick escribió:
> On Mon, 2007-04-23 at 12:17 +0100, Christian Markwart Hoeppner wrote:
> > Hi there!
> > 
> > When explicitly defining a field to use a Select widget, how do I assign
> > choices to the dropdown?
> > 
> > My last attempt:
> > age = forms.IntegerField(label=_('Age'), widget=widgets.Select,
> > choices=range(25,90))
> 
> You can pass in an instance for the widget parameter, it doesn't have to
> be a class. So passing in Select(choices = ....) should work.
> 
> Regards,
> Malcolm
> 
Doesn't work. When passing a list or tuple, or range(), it complains
about unpacking a non-iterable.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to