X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/357027375ff8867f42ca34bcbfb5a78b5b185fc3..d835427a08be1d36308131137e048c3fb441bfaa:/src/search/forms.py diff --git a/src/search/forms.py b/src/search/forms.py old mode 100755 new mode 100644 index 9e0a07880..d62ab6457 --- a/src/search/forms.py +++ b/src/search/forms.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # @@ -9,7 +8,8 @@ from search.fields import JQueryAutoCompleteSearchField class SearchForm(forms.Form): - q = JQueryAutoCompleteSearchField(label=_('Search')) # {'minChars': 2, 'selectFirst': True, 'cacheLength': 50, 'matchContains': "word"}) + q = JQueryAutoCompleteSearchField(label=_('Search')) + # {'minChars': 2, 'selectFirst': True, 'cacheLength': 50, 'matchContains': "word"}) def __init__(self, source, *args, **kwargs): kwargs['auto_id'] = False @@ -17,5 +17,5 @@ class SearchForm(forms.Form): self.fields['q'].widget.attrs['id'] = 'search' self.fields['q'].widget.attrs['autocomplete'] = 'off' self.fields['q'].widget.attrs['data-source'] = source - if not 'q' in self.data: + if 'q' not in self.data: self.fields['q'].widget.attrs['placeholder'] = _('title, author, theme/topic, epoch, kind, genre, phrase')