On Tuesday, June 14, 2011 7:11:41 PM UTC-4, pbreit wrote: > > But vars=something() is not going to work, is it? In general you cannot > call a function if it does not take parameters (web2py restricts those for > serving requests only.
I think that's backwards. You cannot access a function *via a URL* if it * does* take parameters (or if it starts with a double underscore), but nothing is stopping you from calling a function that does not take parameters. The something() function returns a dictionary, which is what the 'vars' argument to response.render is expecting. I think it should work. > > Of course the easiest and most correct way to do it is to redirect. > Redirect is only a little less code, and it ends up generating a new request. It also results in the URL changing, which may not be desirable. Anthony

