renamed fbf app to bird
This commit is contained in:
parent
7724148dfc
commit
2d75a02c6e
19 changed files with 12 additions and 13 deletions
36
bird/forms.py
Normal file
36
bird/forms.py
Normal file
|
@ -0,0 +1,36 @@
|
|||
from django import forms
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from .models import FallenBird
|
||||
|
||||
|
||||
class DateInput(forms.DateInput):
|
||||
input_type = "date"
|
||||
|
||||
|
||||
class BirdAddForm(forms.ModelForm):
|
||||
class Meta:
|
||||
widgets = {
|
||||
"date_found": DateInput()}
|
||||
model = FallenBird
|
||||
fields = ["bird", "date_found", "place", ]
|
||||
labels = {"bird": _("Vogel"), "date_found": _(
|
||||
"Datum des Fundes"), "place": _("Fundort")}
|
||||
|
||||
|
||||
class BirdEditForm(forms.ModelForm):
|
||||
class Meta:
|
||||
widgets = {"date_found": DateInput(format="%Y-%m-%d")}
|
||||
model = FallenBird
|
||||
fields = [
|
||||
"bird",
|
||||
"date_found",
|
||||
"place",
|
||||
"rescuer",
|
||||
]
|
||||
labels = {
|
||||
"bird": _("Vogel"),
|
||||
"date_found": _("Datum des Fundes"),
|
||||
"place": _("Fundort"),
|
||||
"rescuer": _("Retter"),
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue