issue 523, search_widget can be a dict, thanks Ato

This commit is contained in:
mdipierro
2012-06-29 11:22:04 -05:00
parent 00f54c3d31
commit 646ad05aaa
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.00.0 (2012-06-29 09:34:03) dev
Version 2.00.0 (2012-06-29 11:21:59) dev
+2
View File
@@ -1717,6 +1717,8 @@ class SQLFORM(FORM):
if searchable:
sfields = reduce(lambda a,b:a+b,
[[f for f in t if f.readable] for t in tables])
if isinstance(search_widget,dict):
search_widget = search_widget[tablename]
if search_widget=='default':
mq,mf,ms = SQLFORM.search_menu(sfields)
search_widget = lambda sfield, url: FORM(