  
          # If we have a reverse queryset, then the query ordering was in reverse
          # so we need to reverse the items again before returning them to the user.
          if reverse:
              self.page = reversed(self.page)
  
          if reverse:
              # Determine next and previous positions for reverse cursors.
              self.has_next = current_position != '' or offset > 0
              self.has_previous = has_following_postion
 
</s> remove         compare = self.next_position
 </s> add         if self.cursor and self.cursor.reverse and self.cursor.offset != 0:
            # If we're reversing direction and we have an offset cursor
            # then we cannot use the first position we find as a marker.
            compare = self._get_position_from_instance(self.page[-1], self.ordering)
        else:
            compare = self.next_position </s> remove         compare = self.previous_position
 </s> add         if self.cursor and not self.cursor.reverse and self.cursor.offset != 0:
            # If we're reversing direction and we have an offset cursor
            # then we cannot use the first position we find as a marker.
            compare = self._get_position_from_instance(self.page[0], self.ordering)
        else:
            compare = self.previous_position </s> remove     tokens = urlparse.parse_qs(b64decode(encoded), keep_blank_values=True)
 </s> add 
            self.page = list(reversed(self.page))
  
          # If we have a reverse queryset, then the query ordering was in reverse
          # so we need to reverse the items again before returning them to the user.
          if reverse:
            self.page = list(reversed(self.page))
  
          if reverse:
              # Determine next and previous positions for reverse cursors.
              self.has_next = current_position != '' or offset > 0
              self.has_previous = has_following_postion
keep keep keep keep replace keep keep keep keep keep
 Tidy up cursor tests and make more comprehensive 
rest_framework/pagination.py