How to render the radio buttons without ul in django
问题 forms.py Date_Format = ( ('0', ' dd / mm / yyyy'), ('1', 'mm / dd / yyyy'), ) Time_Format = ( ('0', ' 12 hour AM / PM '), ('1', ' 24 hour '), ) class SettingsForm(forms.ModelForm): date_format = forms.ChoiceField(widget=forms.RadioSelect(), choices=Date_Format) time_format = forms.ChoiceField(widget=forms.RadioSelect(), choices=Time_Format) template.py Update: {% for radio in SettingsForm.date_format %} {{ radio.choice_label }} <div class="select">{{ radio.tag }}</div> {% endfor %} The above