Django ChoiceField usage

28 views
Skip to first unread message

sravani v

unread,
May 8, 2014, 12:49:26 PM5/8/14
to django...@googlegroups.com
Hi,

I am new to Django. I am trying to working out on the different fields in this. From that only I found there are model fields and form fields existed in it. Now I am working on radio buttons. 
For this what I have done is,created a model with field 
"title = models.CharField(max_length=3, choices=TITLE_CHOICES)" 

and defined the choices as well. and in the forms.py did 
"title = forms.ChoiceField(choices=TITLE_CHOICES, widget=forms.RadioSelect())".

Finally it shows the title input as list only. Radiobuttons widget not working here.

Please do help

Thank you
Reply all
Reply to author
Forward
0 new messages