ProductDetailModel debug and ticket migrations push

This commit is contained in:
Parsa Nazer
2025-04-22 03:01:04 +03:30
parent 500814b610
commit 5d17038f9b
3 changed files with 45 additions and 2 deletions
+2 -2
View File
@@ -213,14 +213,14 @@ class ProductImageModel(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='جزيات ها')
class Meta:
verbose_name = 'جزیات محصول'
verbose_name_plural = 'جزیات محصول ها'
def __str__(self):
return f'جزيیات محصول {self.detail_category.title} - {self.detail.title}'
return f'جزيیات محصول {self.detail_category.title}'
class ProductVariant(models.Model):
product = models.ForeignKey(ProductModel, on_delete=models.CASCADE, related_name='variants', verbose_name='محصول')