Merge pull request #1737 from kevinlondon/patch-2

Include query parameter override instructions for OrderingFilter
This commit is contained in:
Tom Christie 2014-08-07 09:11:17 +01:00
commit 31591d6cfc

View File

@ -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: