I Have this Form
class MyModelForm(forms.ModelForm):
boolfield = forms.TypedChoice开发者_如何学编程Field(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? ()
Setting the initial property on the field should select False.
You can also custom render the field to display them how you want. You could also define a new widget, but I don't have a link handy for that.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论