new ordering
This commit is contained in:
@@ -137,6 +137,7 @@ class ProductModel(models.Model):
|
|||||||
class Meta:
|
class Meta:
|
||||||
verbose_name = 'محصول'
|
verbose_name = 'محصول'
|
||||||
verbose_name_plural = 'محصولات'
|
verbose_name_plural = 'محصولات'
|
||||||
|
ordering = ['category', 'name']
|
||||||
indexes = [
|
indexes = [
|
||||||
models.Index(fields=['slug'], name='product_slug_idx'),
|
models.Index(fields=['slug'], name='product_slug_idx'),
|
||||||
models.Index(fields=['category'], name='product_category_idx'),
|
models.Index(fields=['category'], name='product_category_idx'),
|
||||||
|
|||||||
Reference in New Issue
Block a user