diff --git a/backend/product/models.py b/backend/product/models.py index 9f6f817..5042b0f 100644 --- a/backend/product/models.py +++ b/backend/product/models.py @@ -137,6 +137,7 @@ class ProductModel(models.Model): class Meta: verbose_name = 'محصول' verbose_name_plural = 'محصولات' + ordering = ['category', 'name'] indexes = [ models.Index(fields=['slug'], name='product_slug_idx'), models.Index(fields=['category'], name='product_category_idx'),