资质缓存
This commit is contained in:
		
							parent
							
								
									b5e961bc64
								
							
						
					
					
						commit
						bc7964474a
					
				| 
						 | 
					@ -21,6 +21,8 @@ from apps.system.mixins import CreateUpdateCustomMixin
 | 
				
			||||||
from utils.queryset import get_child_queryset2
 | 
					from utils.queryset import get_child_queryset2
 | 
				
			||||||
from django.utils import timezone
 | 
					from django.utils import timezone
 | 
				
			||||||
from apps.supervision.permission import RecordPermission
 | 
					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.
 | 
					# Create your views here.
 | 
				
			||||||
import json
 | 
					import json
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -343,6 +345,11 @@ class QualificationotherViewSet(RecordMixin, PageOrNot,ModelViewSet):
 | 
				
			||||||
    filterset_fields = ['qualification__ssbm__name']
 | 
					    filterset_fields = ['qualification__ssbm__name']
 | 
				
			||||||
    ordering_fields = ['qualification__ssbm__name']
 | 
					    ordering_fields = ['qualification__ssbm__name']
 | 
				
			||||||
    ordering = ['create_time']
 | 
					    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'})    
 | 
					    @action(methods=['post'], detail=False, url_path='deletes', url_name='qualificationother_deletes', perms_map = {'post':'qualificationother_deletes'})    
 | 
				
			||||||
    def deletes(self, request):
 | 
					    def deletes(self, request):
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue