jazzmin as a more beauty admin panel
This commit is contained in:
parent
8ea5c87c9c
commit
aca1c3c3fa
117 changed files with 4 additions and 0 deletions
27
app/aviary/forms.py
Normal file
27
app/aviary/forms.py
Normal file
|
@ -0,0 +1,27 @@
|
|||
from datetime import date
|
||||
from django import forms
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from .models import Aviary
|
||||
|
||||
|
||||
class DateInput(forms.DateInput):
|
||||
input_type = "date"
|
||||
|
||||
|
||||
class AviaryEditForm(forms.ModelForm):
|
||||
class Meta:
|
||||
widgets = {
|
||||
"last_ward_round": DateInput(format="%Y-%m-%d", attrs={"value": date.today})
|
||||
}
|
||||
model = Aviary
|
||||
fields = [
|
||||
"description",
|
||||
"condition",
|
||||
"last_ward_round",
|
||||
]
|
||||
labels = {
|
||||
"description": _("Bezeichnung"),
|
||||
"condition": _("Zustand"),
|
||||
"last_ward_round": _("Letzte Inspektion"),
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue