Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
AE UTBM
Sith
Commits
b8c7fb6f
Verified
Commit
b8c7fb6f
authored
Oct 05, 2019
by
Sli
Browse files
django2.2: adapt ChoiceField to the new API
parent
df531198
Changes
1
Hide whitespace changes
Inline
Side-by-side
matmat/views.py
View file @
b8c7fb6f
...
...
@@ -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"
),
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment