diff --git a/bookwyrm/views/announcements.py b/bookwyrm/views/announcements.py index e522fc7f..05386b7b 100644 --- a/bookwyrm/views/announcements.py +++ b/bookwyrm/views/announcements.py @@ -51,7 +51,7 @@ class Announcements(View): form = forms.AnnouncementForm() data = { "announcements": Paginator( - models.Announcement.objects.all(), PAGE_LENGTH + models.Announcement.objects.order_by("-created_date"), PAGE_LENGTH ).get_page(request.GET.get("page")), "form": form, } diff --git a/bookwyrm/views/user.py b/bookwyrm/views/user.py index f62913a9..87e42b4e 100644 --- a/bookwyrm/views/user.py +++ b/bookwyrm/views/user.py @@ -88,7 +88,9 @@ class Followers(View): if is_api_request(request): return ActivitypubResponse(user.to_followers_activity(**request.GET)) - paginated = Paginator(user.followers.all(), PAGE_LENGTH) + paginated = Paginator( + user.followers.order_by("-created_date").all(), PAGE_LENGTH + ) data = { "user": user, "is_self": request.user.id == user.id, @@ -107,7 +109,9 @@ class Following(View): if is_api_request(request): return ActivitypubResponse(user.to_following_activity(**request.GET)) - paginated = Paginator(user.following.all(), PAGE_LENGTH) + paginated = Paginator( + user.following.order_by("-created_date").all(), PAGE_LENGTH + ) data = { "user": user, "is_self": request.user.id == user.id,