解析器
from rest_framework.parsers import JSONParser from rest_framework.parsers import FormParser from rest_framework.parsers import MultiPartParser from rest_framework.parsers import FileUploadParser
在视图类中使用解析器
class Book_cbv(APIView): authentication_classes = [] # permission_classes = [SVIPpermission(),] # throttle_classes = [throttlerate(),] parser_classes = []
在parset_classes中配置上面的4个类就可以了
rest_framework的响应器
from rest_framework.response import Response