This commit is contained in:
gw3000 2023-06-10 22:24:40 +02:00
parent cd696ef6e4
commit d08d86f99b
3 changed files with 46 additions and 7 deletions

28
fbf/forms.py Normal file
View file

@ -0,0 +1,28 @@
from datetime import date
from django import forms
from django.utils.translation import gettext_lazy as _
from .models import FallenBird
class DateInput(forms.DateInput):
input_type = "date"
class BirdForm(forms.ModelForm):
class Meta:
widgets = {"date_found": DateInput()}
model = FallenBird
fields = [
"bird",
"date_found",
"place",
"rescuer",
]
labels = {
"bird": _("Vogel"),
"date_found": _("Datum des Fundes"),
"place": _("Fundort"),
"rescuer": _("Finder"),
}