On Wednesday, May 1, 2019 at 4:53:25 PM UTC-4, [email protected] wrote:
>
> Got the answer in the Telegram chat. Using eval.
> It's a dangerous solution but works.
>

So dangerous you probably shouldn't do it.

Also, do you want to use the value of request.args[0] from the original 
request where the query is saved to the session, or from the subsequent 
request where the query is retrieved from the session? Storing the query 
object itself would achieve the former, whereas using eval would achieve 
the latter.

In either case, the best approach is just to store the data needed to 
generate the query in the session (e.g., table and field name, and the 
request.args value). Then construct the query in the second action. There 
is no need to store the query itself (or a text representation of the query 
code).

Anthony

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to