From 69b7c34a21b2ba571c6360e67593900297dad1b2 Mon Sep 17 00:00:00 2001 From: Andrey Baydashkin Date: Tue, 18 Oct 2016 19:39:50 +0300 Subject: [PATCH] ordering --- api/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/api/views.py b/api/views.py index de937c8..3819bd5 100755 --- a/api/views.py +++ b/api/views.py @@ -178,6 +178,7 @@ class LocationViewSet(ModelViewSet): queryset = Location.objects.root_nodes()[0].get_descendants() except: queryset = Location.objects.all() + queryset = queryset.order_by('name') serializer_class = LocationSerializer filter_class = LocationFilterSet