From 60d3ba6569394b1a7b6228930d342ef7a273f331 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Sat, 14 Sep 2024 20:19:30 +0200 Subject: [PATCH] order platforms by name --- games/views/platform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/games/views/platform.py b/games/views/platform.py index 08ac121..b308cbf 100644 --- a/games/views/platform.py +++ b/games/views/platform.py @@ -19,7 +19,7 @@ def list_platforms(request: HttpRequest) -> HttpResponse: context: dict[Any, Any] = {} page_number = request.GET.get("page", 1) limit = request.GET.get("limit", 10) - platforms = Platform.objects.order_by("-created_at") + platforms = Platform.objects.order_by("name") page_obj = None if int(limit) != 0: paginator = Paginator(platforms, limit)