Il 19/12/14 19:48, Paolo Valleri ha scritto:
> Hi, where are you using the serialized query?
> The simpler solution is to add the following two lines in the
> custom_json function of gluon/serializer.py:
> |
>     elif isinstance(o, set):
>         return list(o)
> |
>
> However this trick will convert the set into a list, and you'll never
> able to convert back the result (a list) into a set.
> If this approach is a problem, we've to build a custom object (ex:
> {'type':'set', 'value': [1,2]} as explained
> here: http://stackoverflow.com/a/8230505
>
> Paolo
>
Thank you Paolo!
I had just found this solution by my self and it works fine for me.
I wanted to create a form component to arbitrarily define queries that
filter results in a grid showed in another component.

Do you suggest alternative solutions?

Thanks again

    Manuele

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