mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-23 01:57:00 +03:00
Update description of OrderingFilter
I added a brief description of how you could specify a different query parameter for the OrderingFilter.
This commit is contained in:
parent
4086e0562c
commit
617745eca0
|
@ -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