def get_ordering(self, request, queryset, view):
params = request.query_params.get(self.ordering_param)<EOL>if params:<EOL><INDENT>fields = strip_spaces(value=params, sep='<STR_LIT:U+002C>', join=False)<EOL>ordering, annotations = self.remove_invalid_fields(queryset, fields, view, request)<EOL>if ordering:<EOL><INDENT>return ordering, annotations<EOL><DEDENT><DEDENT>return self.get_default_ordering(view), None<EOL>
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.