drf提供了更快捷的查询方法ListModelMixin+GenericAPIView,和ListAPIView 1.ListModelMixin+GenericAPIView from django.shortcuts import render from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from…
1.定义View from django.shortcuts import render from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from rest_framework.parsers import JSONParser from rest_framework import mixins, gene…