From 617745eca027dc17c37718a67f82700caef5be3a Mon Sep 17 00:00:00 2001 From: Kevin London Date: Wed, 6 Aug 2014 16:26:56 -0700 Subject: [PATCH] Update description of OrderingFilter I added a brief description of how you could specify a different query parameter for the OrderingFilter. --- rest_framework/filters.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rest_framework/filters.py b/rest_framework/filters.py index 96d15eb9d..c3b846aed 100644 --- a/rest_framework/filters.py +++ b/rest_framework/filters.py @@ -116,6 +116,10 @@ class OrderingFilter(BaseFilterBackend): def get_ordering(self, request): """ 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: