Skip to content

Commit

Permalink
Fix bookshelf default sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
daniviga committed Oct 9, 2023
1 parent 424b17a commit 3ff6b7c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions ram/bookshelf/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ class Publisher(models.Model):
country = CountryField(blank=True)
website = models.URLField(blank=True)

class Meta:
ordering = ["name"]

def __str__(self):
return self.name

Expand All @@ -24,6 +27,9 @@ class Author(models.Model):
first_name = models.CharField(max_length=100)
last_name = models.CharField(max_length=100)

class Meta:
ordering = ["last_name", "first_name"]

def __str__(self):
return f"{self.last_name}, {self.first_name}"

Expand Down
2 changes: 1 addition & 1 deletion ram/ram/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from ram.utils import git_suffix

__version__ = "0.6.4"
__version__ = "0.6.5"
__version__ += git_suffix(__file__)

0 comments on commit 3ff6b7c

Please sign in to comment.