new sliders add for home page

This commit is contained in:
Parsa Nazer
2026-02-20 19:12:14 +03:30
parent 8def6d126a
commit 201a06ea8b
4 changed files with 86 additions and 18 deletions
+8 -2
View File
@@ -181,7 +181,10 @@ class ProductModel(models.Model):
description = models.TextField(verbose_name='توضیحات')
image = models.ImageField(upload_to='product_main/', null=True, blank=True)
rating = models.PositiveIntegerField(default=0, verbose_name='امتیاز')
show = models.BooleanField(default=False, verbose_name='نمایش در خانه')
show_in_trends = models.BooleanField(default=False, verbose_name='نمایش در ترند ها')
show_in_most_viewed = models.BooleanField(default=False, verbose_name='نمایش در پر بازدید ها')
show_in_lot_of_discount = models.BooleanField(default=False, verbose_name='نمایش در پر تخفیف ها')
show_in_top_seller = models.BooleanField(default=False, verbose_name='نمایش در پر فروش ها')
view = models.IntegerField(default=0, verbose_name='بازدید')
slug = models.SlugField(max_length=255, unique=True, blank=True, null=True, allow_unicode=True,
verbose_name='نام یکتا', help_text="این فیلد را خالی بگذارید")
@@ -224,7 +227,10 @@ class ProductModel(models.Model):
models.Index(fields=['category'], name='product_category_idx'),
models.Index(fields=['name'], name='product_name_idx'),
models.Index(fields=['created_at'], name='product_created_at_idx'),
models.Index(fields=['show'], name='product_show_idx'),
models.Index(fields=['show_in_trends'], name='product_show_in_trends_idx'),
models.Index(fields=['show_in_most_viewed'], name='product_most_viewed_idx'),
models.Index(fields=['show_in_lot_of_discount'], name='product_lot_of_discount_idx'),
models.Index(fields=['show_in_top_seller'], name='product_show_in_top_seller_idx'),
models.Index(fields=['category', 'created_at'],
name='product_category_created_idx'),
models.Index(fields=['category', 'name'],