Navbar + css
This commit is contained in:
parent
467c8002e2
commit
f85c67bb49
8 changed files with 78 additions and 10 deletions
|
@ -7,7 +7,7 @@ from django.core.validators import validate_unicode_slug, FileExtensionValidator
|
|||
|
||||
class Category(models.Model):
|
||||
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
||||
name = models.CharField(max_length=64, validators=[validate_unicode_slug])
|
||||
name = models.CharField(max_length=64, validators=[validate_unicode_slug], default="New Category")
|
||||
full_name = models.CharField(max_length=512, editable=False, default="")
|
||||
parent = models.ForeignKey("self", on_delete=models.SET_NULL, blank=True, null=True)
|
||||
|
||||
|
@ -40,7 +40,7 @@ class CategoryForm(ModelForm):
|
|||
|
||||
class Transaction(models.Model):
|
||||
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
||||
name = models.CharField(max_length=256, default="Transaction")
|
||||
name = models.CharField(max_length=256, default="New 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)
|
||||
|
@ -67,7 +67,7 @@ class TransactionForm(ModelForm):
|
|||
|
||||
class Invoice(models.Model):
|
||||
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
||||
name = models.CharField(max_length=256)
|
||||
name = models.CharField(max_length=256, default="New Invoice")
|
||||
file = models.FileField(
|
||||
upload_to="invoices/", validators=[FileExtensionValidator(["pdf"])]
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue