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.
You can switch the view with response.render but I think you would need to pull the "#do something" logic out of that function and put it in a function or module that can be called. Of course the easiest and most correct way to do it is to redirect.

