From cf56b759bb559ed69119fedc9dc62348f06cb635 Mon Sep 17 00:00:00 2001 From: Parsa Nazer Date: Wed, 23 Jul 2025 19:22:29 +0330 Subject: [PATCH] increse product name limit --- .../migrations/0049_alter_productmodel_slug.py | 18 ++++++++++++++++++ backend/product/models.py | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 backend/product/migrations/0049_alter_productmodel_slug.py diff --git a/backend/product/migrations/0049_alter_productmodel_slug.py b/backend/product/migrations/0049_alter_productmodel_slug.py new file mode 100644 index 0000000..3028611 --- /dev/null +++ b/backend/product/migrations/0049_alter_productmodel_slug.py @@ -0,0 +1,18 @@ +# Generated by Django 5.1.2 on 2025-07-23 15:52 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('product', '0048_productvariant_created_at'), + ] + + operations = [ + migrations.AlterField( + model_name='productmodel', + name='slug', + field=models.SlugField(allow_unicode=True, blank=True, help_text='این فیلد را خالی بگذارید', max_length=255, null=True, unique=True, verbose_name='نام یکتا'), + ), + ] diff --git a/backend/product/models.py b/backend/product/models.py index a860acd..1bbe6bd 100644 --- a/backend/product/models.py +++ b/backend/product/models.py @@ -104,7 +104,7 @@ class ProductModel(models.Model): rating = models.PositiveIntegerField(default=0, verbose_name='امتیاز') show = models.BooleanField(default=False, verbose_name='نمایش در خانه') view = models.IntegerField(default=0, verbose_name='بازدید') - slug = models.SlugField(max_length=50, unique=True, blank=True, null=True, allow_unicode=True, + slug = models.SlugField(max_length=255, unique=True, blank=True, null=True, allow_unicode=True, verbose_name='نام یکتا', help_text="این فیلد را خالی بگذارید") meta_description = models.CharField(max_length=300, blank=True, null=True, help_text='این فیلد را حتما پر کنید', verbose_name='متا دیسکریپشن') meta_keywords = models.CharField(max_length=300, blank=True, null=True, help_text='این فیلد را حتما پر کنید', verbose_name='متا کیورد')