|
@@ -2,7 +2,8 @@ from rest_framework.generics import GenericAPIView
|
|
|
from rest_framework.response import Response
|
|
from rest_framework.response import Response
|
|
|
import re
|
|
import re
|
|
|
import math
|
|
import math
|
|
|
-
|
|
|
|
|
|
|
+from utils.JWTAuthentication_diy import APIAuthentication
|
|
|
|
|
+from utils.permissions import CbdDeviceDetailPermission
|
|
|
from .serializers import ZhiBaoSelectViewSerializer
|
|
from .serializers import ZhiBaoSelectViewSerializer
|
|
|
from utils.JWTAuthentication_diy import MyJWTAuthentication
|
|
from utils.JWTAuthentication_diy import MyJWTAuthentication
|
|
|
from utils.permissions import ModulePermission
|
|
from utils.permissions import ModulePermission
|
|
@@ -152,8 +153,8 @@ class PestSelectView(GenericAPIView):
|
|
|
|
|
|
|
|
|
|
|
|
|
class RecentMonthPestCount(GenericAPIView):
|
|
class RecentMonthPestCount(GenericAPIView):
|
|
|
- authentication_classes = [MyJWTAuthentication]
|
|
|
|
|
- permission_classes = [ModulePermission]
|
|
|
|
|
|
|
+ authentication_classes = [APIAuthentication]
|
|
|
|
|
+ permission_classes = [CbdDeviceDetailPermission]
|
|
|
|
|
|
|
|
def get(self, request, *args, **kwargs):
|
|
def get(self, request, *args, **kwargs):
|
|
|
try:
|
|
try:
|