Remove restrictions on category names
This commit is contained in:
parent
b45150d4ff
commit
b4e218f418
2 changed files with 20 additions and 4 deletions
18
nummi/main/migrations/0005_alter_category_name.py
Normal file
18
nummi/main/migrations/0005_alter_category_name.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
# Generated by Django 4.0.4 on 2022-05-22 11:56
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("main", "0004_transaction_payment"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="category",
|
||||
name="name",
|
||||
field=models.CharField(default="New Category", max_length=64),
|
||||
),
|
||||
]
|
|
@ -2,14 +2,12 @@ from datetime import date
|
|||
import uuid
|
||||
from django.db import models
|
||||
from django.forms import ModelForm
|
||||
from django.core.validators import validate_unicode_slug, FileExtensionValidator
|
||||
from django.core.validators import 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], default="New Category"
|
||||
)
|
||||
name = models.CharField(max_length=64, default="New Category")
|
||||
icon = models.CharField(max_length=64, default="folder")
|
||||
|
||||
def __str__(self):
|
||||
|
|
Loading…
Reference in a new issue