资质缓存

This commit is contained in:
曹前明 2022-05-19 11:47:50 +08:00
parent b5e961bc64
commit bc7964474a
1 changed files with 7 additions and 0 deletions

View File

@ -21,6 +21,8 @@ from apps.system.mixins import CreateUpdateCustomMixin
from utils.queryset import get_child_queryset2
from django.utils import timezone
from apps.supervision.permission import RecordPermission
from django.utils.decorators import method_decorator
from django.views.decorators.cache import cache_page
# Create your views here.
import json
@ -343,6 +345,11 @@ class QualificationotherViewSet(RecordMixin, PageOrNot,ModelViewSet):
filterset_fields = ['qualification__ssbm__name']
ordering_fields = ['qualification__ssbm__name']
ordering = ['create_time']
@method_decorator(cache_page(60*60*2))
def list(self, request, *args, **kwargs):
return super().list(request, *args, **kwargs)
@action(methods=['post'], detail=False, url_path='deletes', url_name='qualificationother_deletes', perms_map = {'post':'qualificationother_deletes'})
def deletes(self, request):