      ordering = None
  
      def paginate_queryset(self, queryset, request, view=None):
          self.base_url = request.build_absolute_uri()
          self.ordering = self.get_ordering(view)
  
          # Determine if we have a cursor, and if so then decode it.
          encoded = request.query_params.get(self.cursor_query_param)
          if encoded is None:
              self.cursor = None
 
</s> remove     # Support usage with OrderingFilter
    # Determine how/if True, False and None positions work
 </s> add     # Determine how/if True, False and None positions work - do the string
    # encodings work with Django queryset filters?
    # Consider a max offset cap. </s> remove     def remove_invalid_fields(self, queryset, ordering, view):
 </s> add     def remove_invalid_fields(self, queryset, fields, view): </s> remove         ordering = self.get_ordering(request)

        if ordering:
            # Skip any incorrect parameters
            ordering = self.remove_invalid_fields(queryset, ordering, view)

        if not ordering:
            # Use 'ordering' attribute by default
            ordering = self.get_default_ordering(view)
 </s> add         ordering = self.get_ordering(request, queryset, view) </s> remove             return [param.strip() for param in params.split(',')]
 </s> add             fields = [param.strip() for param in params.split(',')]
            ordering = self.remove_invalid_fields(queryset, fields, view)
            if ordering:
                return ordering

        # No ordering was included, or all the ordering fields were invalid
        return self.get_default_ordering(view) </s> remove         return [term for term in ordering if term.lstrip('-') in valid_fields]
 </s> add         return [term for term in fields if term.lstrip('-') in valid_fields]
        self.ordering = self.get_ordering(request, queryset, view)
      ordering = None
  
      def paginate_queryset(self, queryset, request, view=None):
          self.base_url = request.build_absolute_uri()
        self.ordering = self.get_ordering(request, queryset, view)
  
          # Determine if we have a cursor, and if so then decode it.
          encoded = request.query_params.get(self.cursor_query_param)
          if encoded is None:
              self.cursor = None
keep keep keep keep replace keep keep keep keep keep
 Cursor pagination now works with OrderingFilter 
rest_framework/pagination.py