Sorry, when I replied I only saw Bruno's first reply. I like his option #3 
as well.

Anthony

On Monday, September 17, 2012 3:06:51 PM UTC-4, Carl wrote:
>
> Great idea. But if I use "Bruno option #3" and avoid adding other 
> functions to the module I won't have to repeat myself.
>
>
>
> On Monday, 17 September 2012, Anthony wrote:
>
>> 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): ...
>>>
>>  -- 
>>  
>>  
>>  
>>
>

-- 



Reply via email to