> > In a view you can only call functions defined in this view or a one being > extended/included: > http://web2py.com/books/default/chapter/29/5#Functions-in-views
You can also call functions defined in any model file (all objects defined in model files are available in the view environment), and you can import functions from modules in the view as well. In this case, it's probably a matter of preference whether you *call *the function in the view or the controller (it seems to be related to presentation, so I guess there's an argument for calling it in the view), but you should probably *define *it in a model or a module (you could also define it in the controller, but then you would have to pass the function in the dict returned by the controller). Anthony

