fixed problem with autocomplete, thanks gmini50 (issue 741)

This commit is contained in:
Massimo Di Pierro
2012-03-29 09:59:35 -05:00
parent 0dc169b7dd
commit 4d5d39e887
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -1 +1 @@
Version 1.99.7 (2012-03-29 09:57:01) dev
Version 1.99.7 (2012-03-29 09:59:32) dev
+3 -3
View File
@@ -536,10 +536,10 @@ class AutocompleteWidget(object):
def __init__(self, request, field, id_field=None, db=None,
orderby=None, limitby=(0,10),
keyword='_autocomplete_%(fieldname)s',
min_length=2):
min_length=2, help_fields=None, help_string=None):
self.help_fields = kwargs.get('help_fields',[])
self.help_string = kwargs.get('help_string',None)
self.help_fields = help_fields or []
self.help_string = help_string
if self.help_fields and not self.help_string:
self.help_string = ' '.join('%%(%s)s' for f in self.help_fields)