Yes they should be done in the controller, web2py mostly follows the MVC architecture so most of the business logic is supposed to be in the controller. Notice that if you put the calculations in the view for instance "product_calc.html" then you would not have the result available in "product_calc.pdf" or "product_calc.json" or some other view that you could do for this logic. That said, it's kind of a matter of taste, for instance, you may feel strongly that a given calculation is only useful for a given view so you can start by putting it there and later move it to the controller if you find out that you were wrong and you will need it elsewhere.
-- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.