Template + css for home table
This commit is contained in:
parent
9e7563e38e
commit
6a763a836d
5 changed files with 160 additions and 25 deletions
|
@ -1,3 +1,4 @@
|
|||
from datetime import date
|
||||
import uuid
|
||||
from django.db import models
|
||||
from django.forms import ModelForm
|
||||
|
@ -27,10 +28,11 @@ class Category(models.Model):
|
|||
|
||||
class Transaction(models.Model):
|
||||
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
||||
name = models.CharField(max_length=256)
|
||||
description = models.TextField()
|
||||
value = models.DecimalField(max_digits=12, decimal_places=2)
|
||||
date = models.DateField()
|
||||
name = models.CharField(max_length=256, default="Transaction")
|
||||
description = models.TextField(null=True, blank=True)
|
||||
value = models.DecimalField(max_digits=12, decimal_places=2, default=0)
|
||||
date = models.DateField(default=date.today)
|
||||
trader = models.CharField(max_length=128, blank=True, null=True)
|
||||
category = models.ForeignKey(
|
||||
Category, on_delete=models.SET_NULL, blank=True, null=True
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue