Wednesday, July 14, 2010

Render Radio Button Django

Programmer Question

I Have this Form



class MyModelForm(forms.ModelForm):
boolfield = forms.TypedChoiceField(coerce=bool,
choices=((False, 'No'), (True, 'Yes')),
widget=forms.RadioSelect
)

class Meta:
model = MyModel


How can I show the buttons without LI an UL tags ? (I want to show them together horizontally), and how to set False selected by default? ()



Find the answer here

1 comment:

LinkWithin

Related Posts with Thumbnails