class MyForm(forms.Form):
row_1 = forms.ChoiceField(widget=forms.RadioSelect, choices=CHOICES)
row_2_col_1 = forms.ChoiceField(widget=forms.RadioSelect, choices=CHOICES)
row_2_col_2 = forms.ChoiceField(widget=forms.RadioSelect, choices=CHOICES)
def render_form(request):
form = MyForm()
# render form
我的模板应该是什么,以便最终的 html 类似于
<table>
<tr> row_1 field.. </tr>
<tr>
<td> row_2_col_1 field.. </td>
<td> row_2_col_2 field.. </td>
</tr>