Hi everybody,

I have some problem with my search_widget.
I would like to create search_widget with less fields, but i get 
error: <type 'exceptions.AttributeError'> 'str' object has no attribute 
'get'

My code:
search_options = {'string': ['=', '!=', '<', '>', '<=', '>=', 'starts with', 
'contains', 'in', 'not in']}
 fields = [db.clients.host_name, db.clients.current_project]
 update_grid = SQLFORM.grid(db.clients, (db.clients.host_name, db.clients.
current_project),searchable=True, search_widget=lambda fields, 
search_options: SQLFORM.search_menu(fields, search_options)....

Traceback:

Traceback (most recent call last):
 File "C:\prg\src\tools\vmman\gluon\restricted.py", line 227, in restricted
 exec ccode in environment
 File "C:/prg/src/tools/vmman/applications/VMman/controllers/default.py" 
<http://drzewieckia:8888/admin/default/edit/VMman/controllers/default.py>, line 
89, in <module>
 File "C:\prg\src\tools\vmman\gluon\globals.py", line 417, in <lambda>
 self._caller = lambda f: f()
 File "C:/prg/src/tools/vmman/applications/VMman/controllers/default.py" 
<http://drzewieckia:8888/admin/default/edit/VMman/controllers/default.py>, line 
55, in update
 update_grid = SQLFORM.grid(db.clients, (db.clients.host_name, 
db.clients.RV_version, db.clients.OMS_version, 
db.clients.current_project),searchable=True, search_widget=lambda fields, 
search_options: SQLFORM.search_menu(fields, search_options), editable=False, 
details=False, maxtextlength=50, selectable=selectable, headers=headers, 
csv=False)
 File "C:\prg\src\tools\vmman\gluon\sqlhtml.py", line 2519, in grid
 form = search_widget and search_widget(sfields, url()) or ''
 File "C:/prg/src/tools/vmman/applications/VMman/controllers/default.py" 
<http://drzewieckia:8888/admin/default/edit/VMman/controllers/default.py>, line 
55, in <lambda>
 update_grid = SQLFORM.grid(db.clients, (db.clients.host_name, 
db.clients.RV_version, db.clients.OMS_version, 
db.clients.current_project),searchable=True, search_widget=lambda fields, 
search_options: SQLFORM.search_menu(fields, search_options), editable=False, 
details=False, maxtextlength=50, selectable=selectable, headers=headers, 
csv=False)
 File "C:\prg\src\tools\vmman\gluon\sqlhtml.py", line 1889, in search_menu
 options = search_options.get(ftype, None)
AttributeError: 'str' object has no attribute 'get'


Can u help me ?

Greetings
Adam

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to