                  self.previous_position = following_position
          else:
              # Determine next and previous positions for forward cursors.
              self.has_next = has_following_postion
              self.has_previous = current_position != '' or offset > 0
              if self.has_next:
                  self.next_position = following_position
              if self.has_previous:
                  self.previous_position = current_position
  
 
</s> remove             self.has_next = current_position != '' or offset > 0
 </s> add             self.has_next = (current_position is not None) or (offset > 0) </s> remove         encoded = encode_cursor(cursor)
 </s> add         encoded = _encode_cursor(cursor) </s> remove         if current_position != '':
 </s> add         if current_position is not None:
            primary_ordering_attr = self.ordering[0].lstrip('-') </s> remove                 position = ''
 </s> add                 position = None </s> remove             queryset = queryset.order_by('-' + self.ordering)
 </s> add             queryset = queryset.order_by(_reverse_ordering(self.ordering))
            self.has_previous = (current_position is not None) or (offset > 0)
                  self.previous_position = following_position
          else:
              # Determine next and previous positions for forward cursors.
              self.has_next = has_following_postion
            self.has_previous = (current_position is not None) or (offset > 0)
              if self.has_next:
                  self.next_position = following_position
              if self.has_previous:
                  self.previous_position = current_position
  
keep keep keep keep replace keep keep keep keep keep
 Support for tuple ordering in cursor pagination 
rest_framework/pagination.py