  
          try:
              self.page = paginator.page(page_number)
          except InvalidPage as exc:
              msg = _('Invalid page "{page_number}": {message}.').format(
                  page_number=page_number, message=six.text_type(exc)
              )
              raise NotFound(msg)
  
          if paginator.count > 1:
 
</s> remove     tokens = urlparse.parse_qs(b64decode(encoded), keep_blank_values=True)
 </s> add  </s> remove             self.page = reversed(self.page)
 </s> add             self.page = list(reversed(self.page)) </s> remove     page_size = 5
 </s> add     page_size = api_settings.PAGINATE_BY
    invalid_cursor_message = _('Invalid cursor')
            msg = self.invalid_page_message.format(
  
          try:
              self.page = paginator.page(page_number)
          except InvalidPage as exc:
            msg = self.invalid_page_message.format(
                  page_number=page_number, message=six.text_type(exc)
              )
              raise NotFound(msg)
  
          if paginator.count > 1:
keep keep keep keep replace keep keep keep keep keep
 Tidy up cursor tests and make more comprehensive 
rest_framework/pagination.py