X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/4668015907cd146c6607ba4a14611f4ea7ffe617..1c9e2865ce8c6ab51b2fa3e43d3661089e7b7eb8:/src/search/forms.py?ds=sidebyside diff --git a/src/search/forms.py b/src/search/forms.py index 176c73ee8..3f6c99b75 100644 --- a/src/search/forms.py +++ b/src/search/forms.py @@ -158,8 +158,8 @@ class SearchFilters(forms.Form): def results(self): qs = self.get_querysets() query = self.cleaned_data['q'] - squery = UnaccentSearchQuery(query, config='polish') - query = SearchQuery(query, config='polish') + squery = UnaccentSearchQuery(query, config=settings.SEARCH_CONFIG) + query = SearchQuery(query, config=settings.SEARCH_CONFIG) books = qs['book'].annotate( search_vector=UnaccentSearchVector('title') ).filter(search_vector=squery) @@ -169,7 +169,7 @@ class SearchFilters(forms.Form): headline=SearchHeadline( 'text', query, - config='polish', + config=settings.SEARCH_CONFIG, start_sel='', stop_sel='', )