Re: Field with RadioSelect widget instead of Select widget

2008-08-31 Thread Bela Hausmann
Thanks, that's a good idea, but if I try it, the choices are gone and i get an empty field. I tried: class ProfileForm(ModelForm): def __init__(self, *args, **kwars): super(ModelForm, self).__init__(*args, **kwars) self.fields['gender'].widget =

Re: Field with RadioSelect widget instead of Select widget

2008-08-22 Thread julianb
On Aug 21, 7:30 pm, Bela Hausmann <[EMAIL PROTECTED]> wrote: > Hi! > > I'd like to use the RadioSelect widget for some of my model fields with > choices. But django always uses Select and if I change it manually in the form > class, than I have to specify the choices again and if it's optional or

Field with RadioSelect widget instead of Select widget

2008-08-21 Thread Bela Hausmann
Hi! I'd like to use the RadioSelect widget for some of my model fields with choices. But django always uses Select and if I change it manually in the form class, than I have to specify the choices again and if it's optional or not. So thats not very DRY?! Anyway to do this the right way?