El jueves, 23 de agosto de 2018, 23:08:02 (UTC-3), Anthony escribió:
>
> On Tuesday, August 14, 2018 at 9:59:53 AM UTC-4, Marcelo Huerta wrote:
>>
>> Is it possible at all to search for values contained in fields defined as 
>> list:string in the grid search dialog?
>>
>
> Technically the search functionality can handle such searches, but for 
> some reason, the search widget excludes list:-type fields from the list of 
> searchable fields (unless you are using GAE datastore). Feel free to open a 
> Github issue for that to be changed.
>
> Note, the grid takes a "search_widget" argument, which allows you to 
> specify a custom widget. The default widget is SQLFORM.search_menu. You 
> could create a forked version of that function, allowing list:string fields 
> to be included even for non-GAE databases. 
>

I'm not clear how to create the forked version... Do you mean to modify 
sqlhtml.py directly?

I tried creating a new instance of SQLFORM inheriting from sqlhtml.SQLFORM 
which only defines the new search_menu method, but invoking this new 
SQLFORM instead of the original didn't make any difference.

-- 
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