title: How do you use pagination in a Django REST framework ViewSet subclass?
body: <p>I have a simple subclass of <code>viewsets.ViewSet</code> which looks like:</p>
  
  <pre class="lang-python prettyprint-override"><code>from rest_framework import viewsets
  from rest_framework.response import Response
  
  from ..models import Entry, Sitting, Source, Venue
  from .serializers import (
      SittingSerializer, SittingWithEntriesSerializer,
  )
  
  class SittingViewSet(viewsets.ViewSet):
  
      def list(self, request, version=None):
          queryset = Sitting.objects.order_by('id')
          serializer = SittingSerializer(
              queryset, many=True, context={'request': request}
          )
          return Response(serializer.data)
  
      def retrieve(self, request, pk=None, version=None):
          prefetch_qs = Entry.objects.select_related('speaker')
          queryset = Sitting.objects.order_by('id') \
              .prefetch_related(Prefetch('entry_set', queryset=prefetch_qs))
          sitting = get_object_or_404(queryset, pk=pk)
          serializer = SittingWithEntriesSerializer(
              sitting, context={'request': request}
          )
          return Response(serializer.data)
  </code></pre>
  
  <p>However, the list view isn't paginated, as it is if you use a subclass of <code>ModelViewSet</code>. The settings I'm using are:</p>
  
  <pre class="lang-python prettyprint-override"><code># Django Rest Framework settings:
  REST_FRAMEWORK = {
      'DEFAULT_PERMISSION_CLASSES': ('pombola.api.permissions.ReadOnly',),
      'DEFAULT_VERSIONING_CLASS': 'rest_framework.versioning.URLPathVersioning',
      'PAGE_SIZE': 10,
  }
  </code></pre>
  
  <p>The <a href="http://www.django-rest-framework.org/api-guide/pagination/" rel="noreferrer">documentation</a> suggests looking at the source code for the <a href="https://github.com/tomchristie/django-rest-framework/blob/master/rest_framework/mixins.py" rel="noreferrer">mixins.ListModelMixin</a> and <a href="https://github.com/tomchristie/django-rest-framework/blob/master/rest_framework/generics.py" rel="noreferrer">generics.GenericAPIView</a> classes, but I can't easily see how to reapply what they do to paginate results to these ViewSet methods.</p>
  
  <p>Could anyone suggest what the simplest way would be to change this example to get pagination for the <code>list</code> view?</p>