Update fields icon to slugfield
This commit is contained in:
parent
25e9751de2
commit
ce28f6d0b6
2 changed files with 29 additions and 4 deletions
|
@ -33,11 +33,10 @@ class CustomModel(UserModel):
|
|||
class Account(CustomModel):
|
||||
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
||||
name = models.CharField(max_length=64, default=_("Account"), verbose_name=_("Name"))
|
||||
icon = models.CharField(
|
||||
icon = models.SlugField(
|
||||
max_length=64,
|
||||
default="building-columns",
|
||||
verbose_name=_("Icon"),
|
||||
validators=[validate_slug],
|
||||
)
|
||||
|
||||
def __str__(self):
|
||||
|
@ -79,11 +78,10 @@ class Category(CustomModel):
|
|||
name = models.CharField(
|
||||
max_length=64, default=_("Category"), verbose_name=_("Name")
|
||||
)
|
||||
icon = models.CharField(
|
||||
icon = models.SlugField(
|
||||
max_length=64,
|
||||
default="folder",
|
||||
verbose_name=_("Icon"),
|
||||
validators=[validate_slug],
|
||||
)
|
||||
budget = models.BooleanField(default=True, verbose_name=_("Budget"))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue