2020
10-09
10-09
Django DRF APIView源码运行流程详解
首先写一个简单的drf接口fromrest_framework.viewsimportAPIViewfromrest_framework.responseimportResponse#基于drf写接口,cbvclassDrfTest(APIView):defget(self,request,*args,**kwargs):print(type(request._request))print(type(request))print(request.POST)print(request.GET)response={'status':100,'errors':None}response['users']=user_listreturnResponse(response)d...
继续阅读 >