ProductDetailModel debug and ticket migrations push
This commit is contained in:
@@ -0,0 +1,20 @@
|
|||||||
|
# Generated by Django 5.1.2 on 2025-04-21 23:30
|
||||||
|
|
||||||
|
import django.db.models.deletion
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('product', '0035_alter_attributetype_options_and_more'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='productdetailmodel',
|
||||||
|
name='detail_category',
|
||||||
|
field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='product.productdetailcategory', verbose_name='دسته بندی جزيات'),
|
||||||
|
preserve_default=False,
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -213,14 +213,14 @@ class ProductImageModel(models.Model):
|
|||||||
|
|
||||||
|
|
||||||
class ProductDetailModel(models.Model):
|
class ProductDetailModel(models.Model):
|
||||||
detail_category = models.ForeignKey(ProductDetailCategory, on_delete=models.CASCADE, verbose_name='دسته بندی جزيات', blank=True, null=True)
|
detail_category = models.ForeignKey(ProductDetailCategory, on_delete=models.CASCADE, verbose_name='دسته بندی جزيات')
|
||||||
detail = models.ManyToManyField(DetailModel, verbose_name='جزيات ها')
|
detail = models.ManyToManyField(DetailModel, verbose_name='جزيات ها')
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
verbose_name = 'جزیات محصول'
|
verbose_name = 'جزیات محصول'
|
||||||
verbose_name_plural = 'جزیات محصول ها'
|
verbose_name_plural = 'جزیات محصول ها'
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return f'جزيیات محصول {self.detail_category.title} - {self.detail.title}'
|
return f'جزيیات محصول {self.detail_category.title}'
|
||||||
|
|
||||||
class ProductVariant(models.Model):
|
class ProductVariant(models.Model):
|
||||||
product = models.ForeignKey(ProductModel, on_delete=models.CASCADE, related_name='variants', verbose_name='محصول')
|
product = models.ForeignKey(ProductModel, on_delete=models.CASCADE, related_name='variants', verbose_name='محصول')
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# Generated by Django 5.1.2 on 2025-04-21 23:30
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('ticket', '0022_alter_contactusmodel_options_and_more'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='contactusmodel',
|
||||||
|
name='is_reviewed',
|
||||||
|
field=models.BooleanField(default=False, verbose_name='بررسی شده'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='contactusmodel',
|
||||||
|
name='phone',
|
||||||
|
field=models.CharField(max_length=30, verbose_name='شماره تماس'),
|
||||||
|
),
|
||||||
|
]
|
||||||
Reference in New Issue
Block a user