From e94aeb244069389e047e2bf30943c1fe4c6311f8 Mon Sep 17 00:00:00 2001 From: bkfox Date: Tue, 3 May 2022 11:24:06 +0200 Subject: [PATCH] rename some titles/menu; remove popup on '*/orders?' --- aircox/views/log.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/aircox/views/log.py b/aircox/views/log.py index 564e0cb..a0f8667 100644 --- a/aircox/views/log.py +++ b/aircox/views/log.py @@ -1,6 +1,8 @@ from collections import deque import datetime +from django.utils.decorators import method_decorator +from django.views.decorators.cache import cache_page from django.views.generic import ListView from django.utils import timezone as tz @@ -91,6 +93,10 @@ class LogListAPIView(LogListMixin, BaseAPIView, ListAPIView): serializer_class = LogInfoSerializer queryset = Log.objects.all() + @method_decorator(cache_page(5)) + def list(self, *args, **kwargs): + return super().list(*args, **kwargs) + def get_date(self): date = super().get_date() if date is None: