From cc24abae1d4ceefe127daf39248eb1c4a205133e Mon Sep 17 00:00:00 2001 From: gw3000 Date: Tue, 20 Jun 2023 23:17:54 +0200 Subject: [PATCH] totally proud if showing the right date in forms --- fbf/forms.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fbf/forms.py b/fbf/forms.py index cd8246f..8faa1eb 100644 --- a/fbf/forms.py +++ b/fbf/forms.py @@ -10,7 +10,8 @@ class DateInput(forms.DateInput): class BirdAddForm(forms.ModelForm): class Meta: - widgets = {"date_found": DateInput()} + widgets = { + "date_found": DateInput()} model = FallenBird fields = ["bird", "date_found", "place", ] labels = {"bird": _("Vogel"), "date_found": _( @@ -19,7 +20,7 @@ class BirdAddForm(forms.ModelForm): class BirdEditForm(forms.ModelForm): class Meta: - widgets = {"date_found": DateInput()} + widgets = {"date_found": DateInput(format="%Y-%m-%d")} model = FallenBird fields = [ "bird",