feat: added categories
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Generated by Django 5.1.3 on 2024-12-23 12:01
|
||||
# Generated by Django 5.1.3 on 2024-12-31 09:48
|
||||
|
||||
import django.db.models.deletion
|
||||
import django.utils.timezone
|
||||
@@ -507,12 +507,6 @@ class Migration(migrations.Migration):
|
||||
blank=True, to="files.fileupload", verbose_name="imágenes"
|
||||
),
|
||||
),
|
||||
(
|
||||
"tags",
|
||||
models.ManyToManyField(
|
||||
blank=True, to="shop.tag", verbose_name="etiquetas"
|
||||
),
|
||||
),
|
||||
],
|
||||
options={
|
||||
"verbose_name": "producto",
|
||||
@@ -646,6 +640,64 @@ class Migration(migrations.Migration):
|
||||
"verbose_name_plural": "líneas de carrito",
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name="ProductCategory",
|
||||
fields=[
|
||||
(
|
||||
"id",
|
||||
models.BigAutoField(
|
||||
auto_created=True,
|
||||
primary_key=True,
|
||||
serialize=False,
|
||||
verbose_name="ID",
|
||||
),
|
||||
),
|
||||
("name", models.CharField(max_length=32)),
|
||||
(
|
||||
"promoted",
|
||||
models.BooleanField(default=False, verbose_name="promocionada"),
|
||||
),
|
||||
("hidden", models.BooleanField(default=False, verbose_name="oculta")),
|
||||
(
|
||||
"show_in_navbar",
|
||||
models.BooleanField(
|
||||
default=False, verbose_name="mostrar en cabecera"
|
||||
),
|
||||
),
|
||||
(
|
||||
"slug",
|
||||
models.SlugField(
|
||||
blank=True,
|
||||
default="",
|
||||
max_length=48,
|
||||
unique=True,
|
||||
verbose_name="slug",
|
||||
),
|
||||
),
|
||||
(
|
||||
"parent",
|
||||
models.ForeignKey(
|
||||
blank=True,
|
||||
null=True,
|
||||
on_delete=django.db.models.deletion.SET_NULL,
|
||||
to="shop.productcategory",
|
||||
verbose_name="categoría padre",
|
||||
),
|
||||
),
|
||||
],
|
||||
options={
|
||||
"verbose_name": "categoría",
|
||||
"verbose_name_plural": "categorías",
|
||||
"ordering": ("name",),
|
||||
},
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="product",
|
||||
name="categories",
|
||||
field=models.ManyToManyField(
|
||||
blank=True, to="shop.productcategory", verbose_name="categorías"
|
||||
),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name="ProductBatch",
|
||||
fields=[
|
||||
@@ -758,6 +810,13 @@ class Migration(migrations.Migration):
|
||||
"verbose_name_plural": "métodos de envío",
|
||||
},
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="product",
|
||||
name="tags",
|
||||
field=models.ManyToManyField(
|
||||
blank=True, to="shop.tag", verbose_name="etiquetas"
|
||||
),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name="ProductPrice",
|
||||
fields=[
|
||||
|
||||
Reference in New Issue
Block a user