From cbd5679f806483c7bd9e2d1c188fd0ef1adf2808 Mon Sep 17 00:00:00 2001 From: Parsa Nazer Date: Sat, 30 Aug 2025 17:09:55 +0330 Subject: [PATCH] new ordering --- backend/product/models.py | 1 + 1 file changed, 1 insertion(+) 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'),