I want to show only 5 results and next 5 in other page. my view.py
class QuestionList(APIView):
def get(self, request, *args, **kwargs):
res = Question.objects.all()
paginator = Paginator(res, 5)
serializer = QuestionSerializers(res, many=True)
return Response({"Section": serializer.data})
how will my paginator work here ?