You can put common controller functionality in the model. This is executed 
on each request before the controllers. You can check which controller is 
called in request.controller.

On Sunday, 13 May 2012 17:31:22 UTC+1, Yarin wrote:
>
> I've always liked the idea of controllers as classes, allowing for 
> subclassing of controllers, and thereby providing an easy means of handling 
> common controller functionality. I'm curious as to why web2py didn't follow 
> this approach? Is there a recommended way of handling code that is common 
> to a group of controllers (besides sticking it at the top of a controller 
> file)?

Reply via email to