From 486f4c8047b18cc753e1969079b58ca3da6ab43f Mon Sep 17 00:00:00 2001 From: Chad Barrington Date: Wed, 14 Aug 2013 15:18:44 -0500 Subject: [PATCH 1/2] Update filters.py Here's a little cleanup for ya, brah! --- rest_framework/filters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework/filters.py b/rest_framework/filters.py index c058bc715..fbfdd099e 100644 --- a/rest_framework/filters.py +++ b/rest_framework/filters.py @@ -134,7 +134,7 @@ class OrderingFilter(BaseFilterBackend): ordering = self.remove_invalid_fields(queryset, ordering) if not ordering: - # Use 'ordering' attribtue by default + # Use 'ordering' attribute by default ordering = self.get_default_ordering(view) if ordering: From 99083baf25d3145d034336b2569b79488cf1662b Mon Sep 17 00:00:00 2001 From: Chad Barrington Date: Wed, 14 Aug 2013 16:01:25 -0500 Subject: [PATCH 2/2] Update filters.py Fixed cut n pasted get_ordering docstring for ya bro. --- rest_framework/filters.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rest_framework/filters.py b/rest_framework/filters.py index fbfdd099e..4079e1bd5 100644 --- a/rest_framework/filters.py +++ b/rest_framework/filters.py @@ -109,8 +109,7 @@ class OrderingFilter(BaseFilterBackend): def get_ordering(self, request): """ - Search terms are set by a ?search=... query parameter, - and may be comma and/or whitespace delimited. + Ordering is set by a comma delimited ?ordering=... query parameter. """ params = request.QUERY_PARAMS.get(self.ordering_param) if params: