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



--~--~---------~--~----~------------~-------~--~----~
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