- 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
def __init__(self, source, *args, **kwargs):
kwargs['auto_id'] = False
self.fields['q'].widget.attrs['id'] = 'search'
self.fields['q'].widget.attrs['autocomplete'] = 'off'
self.fields['q'].widget.attrs['data-source'] = source
self.fields['q'].widget.attrs['id'] = 'search'
self.fields['q'].widget.attrs['autocomplete'] = 'off'
self.fields['q'].widget.attrs['data-source'] = source
self.fields['q'].widget.attrs['placeholder'] = _('title, author, theme/topic, epoch, kind, genre, phrase')
self.fields['q'].widget.attrs['placeholder'] = _('title, author, theme/topic, epoch, kind, genre, phrase')