following the example above, how can I call _test() from outside test() ? 2011/4/6 Massimo Di Pierro <massimo.dipie...@gmail.com>
> I think > > arg1 = request.args[0] or None > arg2 = request.args[1] or None > > should be > > arg1 = request.args(0) > arg2 = request.args(1) > > On Apr 6, 8:07 am, Ross Peoples <ross.peop...@gmail.com> wrote: > > But if you are trying to pass arguments to an action in a controller like > > this: > > > > def test(arg1, arg2): > > #some code here > > > > This will not work, as actions must not take any arguments in the > > definition. If this is really what you're going for, then you could do > > something like this: > > > > def test(): > > arg1 = request.args[0] or None > > arg2 = request.args[1] or None > > > > def _test(arg1, arg2): > > #some code here > > > > _test(arg1, arg2) >