From 34d5ce647c2b7e9a8cf1d4108a6b16a741bc19f1 Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Sat, 31 Dec 2022 09:57:34 +0100 Subject: [PATCH] Order form fields - closes #2 --- nummi/main/forms.py | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/nummi/main/forms.py b/nummi/main/forms.py index 7a65a18..0482833 100644 --- a/nummi/main/forms.py +++ b/nummi/main/forms.py @@ -24,13 +24,26 @@ class AccountForm(NummiForm): class CategoryForm(NummiForm): class Meta: model = Category - fields = "__all__" + fields = [ + "name", + "icon", + ] class TransactionForm(NummiForm): class Meta: model = Transaction - fields = "__all__" + fields = [ + "snapshot", + "name", + "value", + "date", + "real_date", + "category", + "trader", + "payment", + "description", + ] def __init__(self, *args, **kwargs): _user = kwargs.get("user") @@ -44,13 +57,16 @@ class InvoiceForm(NummiForm): class Meta: model = Invoice - fields = "__all__" + fields = [ + "name", + "file", + ] class SnapshotForm(NummiForm): class Meta: model = Snapshot - fields = "__all__" + fields = ["account", "start_date", "date", "start_value", "value", "file"] def __init__(self, *args, **kwargs): _user = kwargs.get("user")