title: Django rest framework pagination with custom API view
body: <p>I am trying to add pagination into my project, couldn't find any clear documentation or tutorial.</p>
  
  <p>I have a list of offices</p>
  
  <p>models
  Office.py</p>
  
  <pre><code>class Office(Model):
      name = CharField(_("name"), default=None, max_length=255, null=True)
      email = EmailField(_("email"), default=None, max_length=255, null=True)
      description = TextField(_("description"), default=None, null=True)
  </code></pre>
  
  <p>Serializer</p>
  
  <pre><code>class OfficeSerializer(ModelSerializer):
       id = IntegerField(read_only=True)
       name = CharField(read_only=True)
       email = URLField(read_only=True)
       description = CharField(read_only=True)
  
  class Meta:
      model = Office
      fields = ("id", "name", "email", "description")
  </code></pre>
  
  <p>views.py</p>
  
  <pre><code>@api_view(["GET"])
  @permission_classes((AllowAny,))
  def offices(request):
      instance = Office.objects.filter()[:10]
      serializer = OfficeSerializer(instance, many=True)
  
      return Response(serializer.data)
  </code></pre>
  
  <p>Any help with returning Office list with pagination ?</p>