Template + css for home table

This commit is contained in:
Edgar P. Burkhart 2022-05-20 18:27:55 +02:00
parent 9e7563e38e
commit 6a763a836d
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
5 changed files with 160 additions and 25 deletions

View file

@ -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
)