Fix books default ordering

This commit is contained in:
2023-10-03 21:58:45 +02:00
parent cbd76e4f66
commit 12ac33f4a2
2 changed files with 24 additions and 0 deletions

View File

@@ -52,6 +52,10 @@ class Book(models.Model):
creation_time = models.DateTimeField(auto_now_add=True)
updated_time = models.DateTimeField(auto_now=True)
class Meta:
ordering = ["authors__last_name", "title"]
verbose_name_plural = "Rolling stock"
def __str__(self):
return self.title