From 65df9fd5c6820733b7ba0ec78152bfffb01301db Mon Sep 17 00:00:00 2001 From: Rikuoja Date: Mon, 24 Aug 2015 17:02:49 +0300 Subject: [PATCH 1/2] Fix #3323 --- rest_framework/filters.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/rest_framework/filters.py b/rest_framework/filters.py index 931263670..90c19aba0 100644 --- a/rest_framework/filters.py +++ b/rest_framework/filters.py @@ -102,15 +102,16 @@ class SearchFilter(BaseFilterBackend): def filter_queryset(self, request, queryset, view): search_fields = getattr(view, 'search_fields', None) - orm_lookups = [ - self.construct_search(six.text_type(search_field)) - for search_field in search_fields - ] search_terms = self.get_search_terms(request) if not search_fields or not search_terms: return queryset + orm_lookups = [ + self.construct_search(six.text_type(search_field)) + for search_field in search_fields + ] + base = queryset for search_term in search_terms: queries = [ From 49d799c45428ba88e4487e5cba351f97a5386c99 Mon Sep 17 00:00:00 2001 From: Slava Shklyaev Date: Mon, 24 Aug 2015 21:09:08 +0300 Subject: [PATCH 2/2] Fix typo --- docs/api-guide/pagination.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api-guide/pagination.md b/docs/api-guide/pagination.md index 15ebc6229..881fbf14e 100644 --- a/docs/api-guide/pagination.md +++ b/docs/api-guide/pagination.md @@ -15,7 +15,7 @@ The pagination API can support either: The built-in styles currently all use links included as part of the content of the response. This style is more accessible when using the browsable API. -Pagination is only performed automatically if you're using the generic views or viewsets. If you're using a regular `APIView`, you'll need to call into the pagination API yourself to ensure you return a paginated response. See the source code for the `mixins.ListMixin` and `generics.GenericAPIView` classes for an example. +Pagination is only performed automatically if you're using the generic views or viewsets. If you're using a regular `APIView`, you'll need to call into the pagination API yourself to ensure you return a paginated response. See the source code for the `mixins.ListModelMixin` and `generics.GenericAPIView` classes for an example. ## Setting the pagination style