Re: Question about field/widget relationship

2008-12-12 Thread Matias
Hello, The widget kw can be either a class or an instance. You can do xField(widget=xWidget(choices=mychoices)) Or you can create your xField with your xWidget as default widget and let the field to accept the choices kw. Matias. On Fri, Dec 12, 2008 at 8:44 AM, commander_coder < commander_co..

Question about field/widget relationship

2008-12-12 Thread commander_coder
How does a field pass attributes to a widget? I have approximately this class fooForm(forms.Form): x_choice=myForms.xField(widget=myWidgets.xWidget) where myWidgets.xWidget is a subclass of RadioSelect so it has a required argument like "choices=[('a','1'), ('b','a')]" (this is generated dyn