From b8c7fb6f7439a32d362ea03141ac4bcf9a3df0d8 Mon Sep 17 00:00:00 2001 From: Bartuccio Antoine Date: Sat, 5 Oct 2019 23:50:07 +0200 Subject: [PATCH] django2.2: adapt ChoiceField to the new API --- matmat/views.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/matmat/views.py b/matmat/views.py index 2a76e764..112c1d54 100644 --- a/matmat/views.py +++ b/matmat/views.py @@ -70,7 +70,11 @@ class SearchForm(forms.ModelForm): } sex = forms.ChoiceField( - [("MAN", _("Man")), ("WOMAN", _("Woman")), ("INDIFFERENT", _("Indifferent"))], + choices=[ + ("MAN", _("Man")), + ("WOMAN", _("Woman")), + ("INDIFFERENT", _("Indifferent")), + ], widget=forms.RadioSelect, initial="INDIFFERENT", label=_("Sex"),