Skip to content

Commit

Permalink
Orders pages by most recently published
Browse files Browse the repository at this point in the history
  • Loading branch information
mrharpo committed Jul 8, 2024
1 parent 2ec6a31 commit 94fc8c6
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")

Check warning on line 19 in ov_collections/views.py

View check run for this annotation

Codecov / codecov/patch

ov_collections/views.py#L19

Added line #L19 was not covered by tests

0 comments on commit 94fc8c6

Please sign in to comment.