totally proud if showing the right date in forms
This commit is contained in:
parent
359e71111a
commit
cc24abae1d
1 changed files with 3 additions and 2 deletions
|
@ -10,7 +10,8 @@ class DateInput(forms.DateInput):
|
||||||
|
|
||||||
class BirdAddForm(forms.ModelForm):
|
class BirdAddForm(forms.ModelForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
widgets = {"date_found": DateInput()}
|
widgets = {
|
||||||
|
"date_found": DateInput()}
|
||||||
model = FallenBird
|
model = FallenBird
|
||||||
fields = ["bird", "date_found", "place", ]
|
fields = ["bird", "date_found", "place", ]
|
||||||
labels = {"bird": _("Vogel"), "date_found": _(
|
labels = {"bird": _("Vogel"), "date_found": _(
|
||||||
|
@ -19,7 +20,7 @@ class BirdAddForm(forms.ModelForm):
|
||||||
|
|
||||||
class BirdEditForm(forms.ModelForm):
|
class BirdEditForm(forms.ModelForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
widgets = {"date_found": DateInput()}
|
widgets = {"date_found": DateInput(format="%Y-%m-%d")}
|
||||||
model = FallenBird
|
model = FallenBird
|
||||||
fields = [
|
fields = [
|
||||||
"bird",
|
"bird",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue