Use form template
This commit is contained in:
parent
c5ac2d83c7
commit
11c215e4d8
6 changed files with 20 additions and 22 deletions
|
@ -18,6 +18,8 @@ class Category(models.Model):
|
|||
|
||||
|
||||
class CategoryForm(ModelForm):
|
||||
template_name = "main/form.html"
|
||||
|
||||
class Meta:
|
||||
model = Category
|
||||
fields = ["name", "icon"]
|
||||
|
@ -47,6 +49,8 @@ class Transaction(models.Model):
|
|||
|
||||
|
||||
class TransactionForm(ModelForm):
|
||||
template_name = "main/form.html"
|
||||
|
||||
class Meta:
|
||||
model = Transaction
|
||||
fields = [
|
||||
|
@ -78,6 +82,8 @@ class Invoice(models.Model):
|
|||
|
||||
|
||||
class InvoiceForm(ModelForm):
|
||||
template_name = "main/form.html"
|
||||
|
||||
class Meta:
|
||||
model = Invoice
|
||||
fields = ["name", "file"]
|
||||
|
@ -178,6 +184,8 @@ class Snapshot(models.Model):
|
|||
|
||||
|
||||
class SnapshotForm(ModelForm):
|
||||
template_name = "main/form.html"
|
||||
|
||||
class Meta:
|
||||
model = Snapshot
|
||||
fields = ["date", "value"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue