django2.2: adapt ChoiceField to the new API

This commit is contained in:
Antoine Bartuccio 2019-10-05 23:50:07 +02:00
parent df531198c9
commit b8c7fb6f74
Signed by: klmp200
GPG Key ID: E7245548C53F904B

View File

@ -70,7 +70,11 @@ class SearchForm(forms.ModelForm):
} }
sex = forms.ChoiceField( sex = forms.ChoiceField(
[("MAN", _("Man")), ("WOMAN", _("Woman")), ("INDIFFERENT", _("Indifferent"))], choices=[
("MAN", _("Man")),
("WOMAN", _("Woman")),
("INDIFFERENT", _("Indifferent")),
],
widget=forms.RadioSelect, widget=forms.RadioSelect,
initial="INDIFFERENT", initial="INDIFFERENT",
label=_("Sex"), label=_("Sex"),