Skip to content

Commit

Permalink
🍔 Page order (#189)
Browse files Browse the repository at this point in the history
Orders pages by most recently published for Exhibits and Collections

Closes #173
  • Loading branch information
mrharpo authored Jul 8, 2024
1 parent 257b595 commit cb5c75d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions exhibits/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ class ExhibitsAPIViewSet(PagesAPIViewSet):
'hero_thumb',
'authors',
]

def get_queryset(self):
return self.model.objects.live().order_by("-last_published_at")
3 changes: 3 additions & 0 deletions ov_collections/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ class CollectionAPIViewSet(PagesAPIViewSet):
'introduction',
'cover_image',
]

def get_queryset(self):
return self.model.objects.live().order_by("-last_published_at")

0 comments on commit cb5c75d

Please sign in to comment.