Adds ordering to status model

This commit is contained in:
Mouse Reeve
2021-03-24 08:37:25 -07:00
parent a67b0ae8a7
commit 1707bba8a8
2 changed files with 21 additions and 0 deletions

View File

@ -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)