mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-29 21:14:01 +03:00
Merge pull request #1737 from kevinlondon/patch-2
Include query parameter override instructions for OrderingFilter
This commit is contained in:
commit
31591d6cfc
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user