diff options
| author | Kevin London | 2014-08-06 16:26:56 -0700 |
|---|---|---|
| committer | Kevin London | 2014-08-06 16:26:56 -0700 |
| commit | 617745eca027dc17c37718a67f82700caef5be3a (patch) | |
| tree | 4bfae88c2f804536be0cf7c72d9aa1b761c47047 /rest_framework | |
| parent | 4086e0562c104b758313fa9b8ac22ede3642a579 (diff) | |
| download | django-rest-framework-617745eca027dc17c37718a67f82700caef5be3a.tar.bz2 | |
Update description of OrderingFilter
I added a brief description of how you could specify a different query parameter for the OrderingFilter.
Diffstat (limited to 'rest_framework')
| -rw-r--r-- | rest_framework/filters.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/rest_framework/filters.py b/rest_framework/filters.py index 96d15eb9..c3b846ae 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: |
