Add icons to categories
This commit is contained in:
parent
9ca4b0d391
commit
98a1037d5e
4 changed files with 27 additions and 3 deletions
|
@ -10,6 +10,7 @@ class Category(models.Model):
|
|||
name = models.CharField(
|
||||
max_length=64, validators=[validate_unicode_slug], default="New Category"
|
||||
)
|
||||
icon = models.CharField(max_length=64, default="folder")
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
@ -21,7 +22,7 @@ class Category(models.Model):
|
|||
class CategoryForm(ModelForm):
|
||||
class Meta:
|
||||
model = Category
|
||||
fields = ["name"]
|
||||
fields = ["name", "icon"]
|
||||
|
||||
|
||||
class Transaction(models.Model):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue