                  offset = 0
                  position = self.next_position
  
          cursor = Cursor(offset=offset, reverse=True, position=position)
          encoded = encode_cursor(cursor)
          return replace_query_param(self.base_url, self.cursor_query_param, encoded)
  
      def get_ordering(self):
          return 'created'
  
 
</s> remove         encoded = encode_cursor(cursor)
 </s> add         encoded = _encode_cursor(cursor) </s> remove         return 'created'
 </s> add         """
        Return a tuple of strings, that may be used in an `order_by` method.
        """
        return ('created',) </s> remove         return str(getattr(instance, ordering))
 </s> add         attr = getattr(instance, ordering[0])
        return six.text_type(attr) </s> remove Cursor = namedtuple('Cursor', ['offset', 'reverse', 'position'])


def decode_cursor(encoded):
    try:
        querystring = b64decode(encoded.encode('ascii')).decode('ascii')
        tokens = urlparse.parse_qs(querystring, keep_blank_values=True)
        offset = int(tokens['offset'][0])
        reverse = bool(int(tokens['reverse'][0]))
        position = tokens['position'][0]
    except (TypeError, ValueError):
        return None

    return Cursor(offset=offset, reverse=reverse, position=position)


def encode_cursor(cursor):
    tokens = {
        'offset': str(cursor.offset),
        'reverse': '1' if cursor.reverse else '0',
        'position': cursor.position
    }
    querystring = urlparse.urlencode(tokens, doseq=True)
    return b64encode(querystring.encode('ascii')).decode('ascii')


 </s> add  </s> remove                 position = ''
 </s> add                 position = None
        encoded = _encode_cursor(cursor)
                  offset = 0
                  position = self.next_position
  
          cursor = Cursor(offset=offset, reverse=True, position=position)
        encoded = _encode_cursor(cursor)
          return replace_query_param(self.base_url, self.cursor_query_param, encoded)
  
      def get_ordering(self):
          return 'created'
  
keep keep keep keep replace keep keep keep keep keep
 Support for tuple ordering in cursor pagination 
rest_framework/pagination.py