mirror of
https://github.com/daniviga/django-ram.git
synced 2025-08-04 13:17:50 +02:00
Rely on slugs to have a more natural sorting
This commit is contained in:
@@ -43,7 +43,7 @@ class Manufacturer(models.Model):
|
||||
)
|
||||
|
||||
class Meta:
|
||||
ordering = ["category", "name"]
|
||||
ordering = ["category", "slug"]
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
@@ -78,7 +78,7 @@ class Company(models.Model):
|
||||
|
||||
class Meta:
|
||||
verbose_name_plural = "Companies"
|
||||
ordering = ["name"]
|
||||
ordering = ["slug"]
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
@@ -207,7 +207,7 @@ class Tag(models.Model):
|
||||
slug = models.CharField(max_length=128, unique=True)
|
||||
|
||||
class Meta:
|
||||
ordering = ["name"]
|
||||
ordering = ["slug"]
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
Reference in New Issue
Block a user