class TestView(APIView): ''' 调用这个函数的时候,会自动触发authentication_classes的运行,所以会先执行上边的类 ''' authentication_classes = [TestAuthentication,] permission_classes = [] # def dispath(self,request,*args,**kwargs): # return super().dispatch(request,*args,**kwargs)…