def get_ordering(self, request, queryset, view):
        """
        Ordering is set by a comma delimited ?ordering=... query parameter.

        The `ordering` query parameter can be overridden by setting
        the `ordering_param` value on the OrderingFilter or by
        specifying an `ORDERING_PARAM` value in the API settings.
        """
        params = request.query_params.get(self.ordering_param)
        if params:
            fields = strip_spaces(value=params, sep=',', join=False)
            ordering, annotations = self.remove_invalid_fields(queryset, fields, view, request)
            if ordering:
                return ordering, annotations

        # No ordering was included, or all the ordering fields were invalid
        return self.get_default_ordering(view), None
def get_ordering ( self , request , queryset , view ) : params = request . query_params . get ( self . ordering_param ) if params : fields = strip_spaces ( value = params , sep = ',' , join = False ) ordering , annotations = self . remove_invalid_fields ( queryset , fields , view , request ) if ordering : return ordering , annotations return self . get_default_ordering ( view ) , None
Ordering is set by a comma delimited ?ordering=... query parameter.

        The `ordering` query parameter can be overridden by setting
        the `ordering_param` value on the OrderingFilter or by
        specifying an `ORDERING_PARAM` value in the API settings.