我有一个ChoiceField
,现在如何在需要时获得标签?
class ContactForm(forms.Form):
reason = forms.ChoiceField(choices=[("feature", "A feature"),
("order", "An order")],
widget=forms.RadioSelect)
form.cleaned_data["reason"]
只给我feature
ororder
值左右。