Maybe make a dictionary of functions, then map request.args(0) to the
dictionary keys to identify the right function to call (that way if someone
tampers with the URL, they can't call any function that's not in the
dictionary).
Anthony
On Monday, September 17, 2012 1:33:26 PM UTC-4, Carl wrote:
>
> I've got a request object coming to my Web2py app's controller function.
>
> request.args[0] is another function name e.g., blastoff
> request.vars are parameters e.g., Storage object: {'seconds':10,
> 'confirm' : 'okay'}
>
> how can I call blastoff with the parameters such that I can write
> blastoff as...
>
> def blastoff(seconds, confirm): ...
>
--