diff --git a/biscuit/apps/exlibris/models.py b/biscuit/apps/exlibris/models.py index f23f84f796755916c1b3e0e11b40aa9422a4c892..294dabc01191d9b729c5add415f4812b74806c73 100644 --- a/biscuit/apps/exlibris/models.py +++ b/biscuit/apps/exlibris/models.py @@ -37,6 +37,7 @@ class Book(SchoolRelated): class Meta: unique_together = [['school', 'title', 'author', 'edition', 'year']] + ordering = ['title', 'year', 'edition'] class BookCopy(models.Model): @@ -84,3 +85,6 @@ class BookCopy(models.Model): def is_deleteable(self) -> bool: return not self.borrow_count and not self.borrower + + class Meta: + ordering = ['book__title', 'book__year', 'book__edition', 'copy_num']