fix color name size

sync
Raz 8 months ago
parent 5f0d4bbb12
commit d9d2a6fec8
  1. 23
      shop/migrations/0021_alter_color_name_alter_product_sku.py
  2. 2
      shop/models.py

@ -0,0 +1,23 @@
# Generated by Django 4.2.11 on 2025-03-21 14:02
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('shop', '0020_product_sku'),
]
operations = [
migrations.AlterField(
model_name='color',
name='name',
field=models.CharField(max_length=40, unique=True),
),
migrations.AlterField(
model_name='product',
name='sku',
field=models.CharField(help_text='Product SKU (unique identifier)', max_length=50, unique=True),
),
]

@ -14,7 +14,7 @@ class CutChoices(models.IntegerChoices):
KIDS = 3, 'Kids'
class Color(models.Model):
name = models.CharField(max_length=20, unique=True)
name = models.CharField(max_length=40, unique=True)
colorHex = models.CharField(max_length=7, default="#FFFFFF", help_text="Color in hex format (e.g. #FF0000)")
secondary_hex_color = models.CharField(max_length=7, null=True, blank=True,
help_text="Secondary color in hex format for split color display")

Loading…
Cancel
Save