From 7cb8bc6bacd64efa0cea12707ae633f7ac9e2433 Mon Sep 17 00:00:00 2001 From: Commander1024 Date: Sat, 22 Aug 2020 02:59:04 +0200 Subject: [PATCH] Added place_list sorting to sort by name. --- lostplaces/lostplaces_app/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lostplaces/lostplaces_app/views.py b/lostplaces/lostplaces_app/views.py index 66336a6..1c3c29c 100644 --- a/lostplaces/lostplaces_app/views.py +++ b/lostplaces/lostplaces_app/views.py @@ -53,6 +53,7 @@ class PlaceListView(IsAuthenticated, ListView): paginate_by = 5 model = Place template_name = 'place/place_list.html' + ordering = ['name'] class PlaceDetailView(IsAuthenticated, View): def get(self, request, pk):