From 73b9c41be88b3f25db318ad1311a03803f5a3bf2 Mon Sep 17 00:00:00 2001 From: through-your-tears Date: Sun, 7 Apr 2024 01:40:18 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=B2=D1=8B=D0=B4=D0=B0=D1=87=D0=B0=20=D0=BF?= =?UTF-8?q?=D0=BE=20=D1=82=D0=BE=D1=87=D0=BA=D0=B0=D0=BC=20=D0=BD=D0=B0=20?= =?UTF-8?q?=D0=BA=D0=B0=D1=80=D1=82=D0=B5(=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=20=D0=BA=D1=8D=D1=88)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/organizations/views.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/organizations/views.py b/src/organizations/views.py index b77432f..9174e13 100644 --- a/src/organizations/views.py +++ b/src/organizations/views.py @@ -64,6 +64,11 @@ class OrganizationSearchListAPIView(ListAPIView): class OrganizationMapFilterAPIView(ListAPIView): serializer_class = OrganizationListSerializer + @method_decorator(vary_on_cookie) + @method_decorator(cache_page(settings.CACHE_TTL)) + def dispatch(self, request, *args, **kwargs): + return super(OrganizationMapFilterAPIView, self).dispatch(request, *args, **kwargs) + def get_queryset(self): ids = list(map(int, self.request.query_params.get('id').split(','))) coords1 = (float(self.request.query_params.get('lat1')), float(self.request.query_params.get('lon1')))