From 129debea5af317542c788feb668a993718cbe654 Mon Sep 17 00:00:00 2001 From: richtier Date: Mon, 9 Mar 2020 15:42:12 +0000 Subject: [PATCH] Improve speed of /api/pages/ --- core/views.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/views.py b/core/views.py index ca1cae37..72118c8f 100644 --- a/core/views.py +++ b/core/views.py @@ -80,6 +80,11 @@ def get_object(self): self.handle_activate_language(instance) return instance + def listing_view(self, request): + queryset = self.filter_queryset(self.get_queryset()) + data = queryset.values_list('pk', flat=True) + return Response(data) + class PagesOptionalDraftAPIEndpoint(APIEndpointBase): pass