title: How can I use pagination_class in django-rest-framework for my custom pagination class
body: <p><strong>My pagination Class</strong></p>
  
  <pre><code>class ArticleListPagination(PageNumberPagination):
      page_size = 2
      page_size_query_param = 'page_size'
  </code></pre>
  
  <p><strong>My Article View Class</strong></p>
  
  <pre><code>class Article(generics.GenericAPIView):
  
      queryset = Articles.objects.all()
      serializer_class = ArticlesSerializer
      pagination_class = ArticleListPagination
  
  def get(self, request):
      queryset = self.get_queryset()
      serializer = ArticlesSerializer(queryset, many=True)
      return Response(serializer.data, status=status.HTTP_200_OK)
  </code></pre>
  
  <p>I am able to use custom pagination class using this</p>
  
  <pre><code>def get(self, request):
      queryset = self.get_queryset()
      page = ArticleListPagination()
      new = page.paginate_queryset(queryset, request)
      serializer = ArticlesSerializer(new, many=True)
      return Response(serializer.data, status=status.HTTP_200_OK)
  </code></pre>
  
  <p>Is it the proper way to use <code>ArticleListPagination</code>? If I have stated in my class that my pagination class is <code>ArticleListPagination</code>, why it is not changing the return queryset object.</p>