django2.2: adapt DateTimeField in forms with the new API

This commit is contained in:
2019-10-05 23:24:31 +02:00
parent 6cc234e8d3
commit 12b6f0d488
5 changed files with 21 additions and 15 deletions

View File

@ -159,13 +159,13 @@ class MailingForm(forms.Form):
class SellingsFormBase(forms.Form):
begin_date = forms.DateTimeField(
["%Y-%m-%d %H:%M:%S"],
input_formats=["%Y-%m-%d %H:%M:%S"],
label=_("Begin date"),
required=False,
widget=SelectDateTime,
)
end_date = forms.DateTimeField(
["%Y-%m-%d %H:%M:%S"],
input_formats=["%Y-%m-%d %H:%M:%S"],
label=_("End date"),
required=False,
widget=SelectDateTime,