From a84209eb81d5b0881743eda15fd807acdd2cb348 Mon Sep 17 00:00:00 2001 From: Lukas Kucharczyk Date: Sun, 11 Aug 2024 21:39:14 +0200 Subject: [PATCH] sort by timestamp --- games/sessionviews.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/games/sessionviews.py b/games/sessionviews.py index bce6359..283e3bc 100644 --- a/games/sessionviews.py +++ b/games/sessionviews.py @@ -24,7 +24,7 @@ def list_sessions(request: HttpRequest) -> HttpResponse: context: dict[Any, Any] = {} page_number = request.GET.get("page", 1) limit = request.GET.get("limit", 10) - sessions = Session.objects.order_by("-created_at") + sessions = Session.objects.order_by("-timestamp_start") page_obj = None if int(limit) != 0: paginator = Paginator(sessions, limit)