diff options
Diffstat (limited to '')
-rw-r--r-- | app/forms.py | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/app/forms.py b/app/forms.py index da5fc9e..9490839 100644 --- a/app/forms.py +++ b/app/forms.py @@ -27,41 +27,41 @@ class DecimalField(fields.DecimalField): req = [v.input_required()] class ExpenseForm(Form): - date = DateField("Datum", req, + date = DateField(u"Datum", req, format="%d.%m.%Y", default=today()) - expense = DecimalField("Betrag", req, - description="EUR", + expense = DecimalField(u"Betrag", req, + description=u"EUR", places=2) - description = StringField("Beschreibung", req) + description = StringField(u"Beschreibung", req) - category = QuerySelectField("Kategorie", + category = QuerySelectField(u"Kategorie", get_label="name") class ConstForm(Form): - start = DateField("Beginn", req, + start = DateField(u"Beginn", req, format="%m.%Y", default=today()) - end = DateField("Ende", req, + end = DateField(u"Ende", req, format="%m.%Y", default=today(), - description="(einschließlich)") + description=u"(einschließlich)") - months = IntegerField("Zahlungsrythmus", req, + months = IntegerField(u"Zahlungsrythmus", req, description="Monate") - expense = DecimalField("Betrag", req, - description="EUR", + expense = DecimalField(u"Betrag", req, + description=u"EUR", places=2) - desc = StringField("Beschreibung", req) + desc = StringField(u"Beschreibung", req) - cat = QuerySelectField("Kategorie", + cat = QuerySelectField(u"Kategorie", get_label="name") - prev = QuerySelectField("Vorgänger", + prev = QuerySelectField(u"Vorgänger", get_label="description", allow_blank=True) |