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:
Kevin London 2014-08-06 16:26:56 -07:00
parent 4086e0562c
commit 617745eca0

View File

@ -116,6 +116,10 @@ class OrderingFilter(BaseFilterBackend):
def get_ordering(self, request): def get_ordering(self, request):
""" """
Ordering is set by a comma delimited ?ordering=... query parameter. 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) params = request.QUERY_PARAMS.get(self.ordering_param)
if params: if params: