Fix uicon field type
This commit is contained in:
parent
629c993072
commit
93b31dabee
2 changed files with 24 additions and 4 deletions
|
@ -0,0 +1,22 @@
|
||||||
|
# Generated by Django 4.1.4 on 2023-04-19 08:06
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
dependencies = [
|
||||||
|
("main", "0025_alter_account_options_alter_invoice_options_and_more"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name="account",
|
||||||
|
name="uicon",
|
||||||
|
field=models.CharField(default="🏦", max_length=1, verbose_name="Icon"),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name="category",
|
||||||
|
name="uicon",
|
||||||
|
field=models.CharField(default="📂", max_length=1, verbose_name="Icon"),
|
||||||
|
),
|
||||||
|
]
|
|
@ -43,10 +43,9 @@ def get_path(instance, filename):
|
||||||
class Account(CustomModel):
|
class Account(CustomModel):
|
||||||
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
||||||
name = models.CharField(max_length=64, default=_("Account"), verbose_name=_("Name"))
|
name = models.CharField(max_length=64, default=_("Account"), verbose_name=_("Name"))
|
||||||
uicon = models.SlugField(
|
uicon = models.CharField(
|
||||||
max_length=1,
|
max_length=1,
|
||||||
default="🏦",
|
default="🏦",
|
||||||
allow_unicode=True,
|
|
||||||
verbose_name=_("Icon"),
|
verbose_name=_("Icon"),
|
||||||
)
|
)
|
||||||
default = models.BooleanField(default=False, verbose_name=_("Default"))
|
default = models.BooleanField(default=False, verbose_name=_("Default"))
|
||||||
|
@ -97,10 +96,9 @@ class Category(CustomModel):
|
||||||
name = models.CharField(
|
name = models.CharField(
|
||||||
max_length=64, default=_("Category"), verbose_name=_("Name")
|
max_length=64, default=_("Category"), verbose_name=_("Name")
|
||||||
)
|
)
|
||||||
uicon = models.SlugField(
|
uicon = models.CharField(
|
||||||
max_length=1,
|
max_length=1,
|
||||||
default="📂",
|
default="📂",
|
||||||
allow_unicode=True,
|
|
||||||
verbose_name=_("Icon"),
|
verbose_name=_("Icon"),
|
||||||
)
|
)
|
||||||
budget = models.BooleanField(default=True, verbose_name=_("Budget"))
|
budget = models.BooleanField(default=True, verbose_name=_("Budget"))
|
||||||
|
|
Loading…
Reference in a new issue