diff --git a/nummi/main/migrations/0005_alter_category_name.py b/nummi/main/migrations/0005_alter_category_name.py new file mode 100644 index 0000000..b88b522 --- /dev/null +++ b/nummi/main/migrations/0005_alter_category_name.py @@ -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), + ), + ] diff --git a/nummi/main/models.py b/nummi/main/models.py index bd4b412..38aa299 100644 --- a/nummi/main/models.py +++ b/nummi/main/models.py @@ -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):