Adds ordering to status model
This commit is contained in:
parent
a67b0ae8a7
commit
1707bba8a8
2 changed files with 21 additions and 0 deletions
|
@ -58,6 +58,10 @@ class Status(OrderedCollectionPageMixin, BookWyrmModel):
|
|||
serialize_reverse_fields = [("attachments", "attachment", "id")]
|
||||
deserialize_reverse_fields = [("attachments", "attachment")]
|
||||
|
||||
class Meta:
|
||||
""" default sorting """
|
||||
ordering = ("-published_date",)
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
""" save and notify """
|
||||
super().save(*args, **kwargs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue