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 not. > So thats not very DRY?! > > Anyway to do this the right way?
Maybe you can change the widget after the form got declared: form = BlaForm() form.fields['field'].widget = forms.RadioSelect() But I'm not quite sure what it does with the "------" line you have in a Select field. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---