title: How to paginate response from function based view of django rest framework?
body: <p>I have written a code snippet like below, i need to achieve pagination in this, kindly let me know how is it possible. Also due to some reasons i want to use only function based views.</p>
  <pre><code>@api_view(['GET'])
  @permission_classes([AllowAny])
  def PersonView(request):
      context={'request': request}
      person_objects = Person.objects.all()
      if len(person_objects) &gt; 0:
          person_data = PersonSerializer(person_objects, many=True, context=context)
          return Response(person_data.data, status=status.HTTP_200_OK)
      else:
          return Response({}, status=status.HTTP_200_OK)
  </code></pre>