Django Rest Framework分页最大页码数

class Users(ModelViewSet):
    """管理所有用户信息"""
    serializer_class = serializers.UserSerializers
    queryset = models~~删除线格式~~ .UserModel.objects.all()

    def list(self, request, *args, **kwargs):
        page = self.paginate_queryset(self.get_queryset())
        serializer = self.get_serializer(page, many=True)
        response = self.get_paginated_response(serializer.data)
        return Response(json_msg(0, data=response.data))

Django Rest Framework分页最大页码数_第1张图片

你可能感兴趣的:(rest-framework)