Features: 1) Update category.slug to derive from name and parent__slug; 2) Update product.slug to derive from uuid, category__slug, brand__slug, and name;
Fixes: None; Extra: None;
This commit is contained in:
parent
400d198afc
commit
82a79c31f9
1 changed files with 38 additions and 0 deletions
|
|
@ -0,0 +1,38 @@
|
|||
# Generated by Django 5.2 on 2025-06-21 16:04
|
||||
|
||||
import django_extensions.db.fields
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("core", "0027_brand_priority_alter_brand_slug"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="category",
|
||||
name="slug",
|
||||
field=django_extensions.db.fields.AutoSlugField(
|
||||
allow_unicode=True,
|
||||
blank=True,
|
||||
editable=False,
|
||||
null=True,
|
||||
populate_from=("name", "parent__slug"),
|
||||
unique=True,
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="product",
|
||||
name="slug",
|
||||
field=django_extensions.db.fields.AutoSlugField(
|
||||
allow_unicode=True,
|
||||
blank=True,
|
||||
editable=False,
|
||||
null=True,
|
||||
populate_from=("uuid", "category__slug", "brand__slug", "name"),
|
||||
unique=True,
|
||||
),
|
||||
),
|
||||
]
|
||||
Loading…
Reference in a new issue