Response(ser.data)
返回的时候可以用get_paginated_response方法
自带上一页下一页
第三种分页 CursorPagination
加密分页方式,只能通过点“上一页...、序列化和分页
# MyProject2/urls.py
from django.contrib import admin
from django.urls import path,include...urlpatterns = [
#path('admin/', admin.site.urls),
path('api/',include('api.urls') ),
]
# api/...urls.py
from django.urls import path,re_path
from .views import UserView,PaserView,RolesView,UserInfoView...的头
#FormParser:表示只能解析content-type:application/x-www-form-urlencoded的头
def post(self,request,