django ModelViewset关闭自动分页

声明 pagination_class = None


class TaskViewSet(mixins.ListModelMixin,
                    viewsets.GenericViewSet):
    queryset = Task.objects.all()
    serializer_class = TasksSerializer
    pagination_class = None