diff options
Diffstat (limited to 'budget/forms.py')
| -rw-r--r-- | budget/forms.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/budget/forms.py b/budget/forms.py index c2455da..a097abe 100644 --- a/budget/forms.py +++ b/budget/forms.py @@ -174,3 +174,16 @@ class CreateArchiveForm(Form): name = TextField(_("Name for this archive (optional)"), validators=[]) start_date = DateField(_("Start date"), validators=[Required()]) end_date = DateField(_("End date"), validators=[Required()], default=datetime.now) + + +class ExportForm(Form): + export_type = SelectField(_("What do you want to download ?"), + validators=[Required()], + coerce=str, + choices=[("bills", _("bills")), ("transactions", _("transactions"))] + ) + export_format = SelectField(_("Export file format"), + validators=[Required()], + coerce=str, + choices=[("csv", "csv"), ("json", "json")] + ) |
