Yes, response._caller. You can wrap this function, take a look at the following for an example.
http://packages.python.org/web2py_utils/output.html#compress-output http://hg.thadeusb.com/Web/web2py_utils/file/9581a47022ee/web2py_utils/output.py Notice how I change response._caller to my custom function which receives the response from your controller. If its a function, we call it, if its a dict, we render the template, and we return the html content. -- Thadeus On Sun, May 9, 2010 at 8:16 AM, David Marko <[email protected]> wrote: > And where is the good pace to make such call? Has web2py some place > which is guarantied to be called after response has been sent to > browser? > > David > > On 9 kvÄ›, 13:14, rfx_labs <[email protected]> wrote: >> Hi David, >> >> I think the problem is that modules and controllers are executed on >> every page call. >> >> The web2py DAL open AND close a new connection to the DB on ever page >> call. Maybe you shut do the same for mongo too. >> >> >>> connection = Connection() >> do your stuff >> >>> connection.disconnect() >> >> Martin >> >> On 9 Mai, 08:22, David Marko <[email protected]> wrote: >> >> >> >> > Thank you for your response. I still have the problem with the >> > connection object to MongoDB as stated in my first post. Where to put >> > the lines establishing the connection? >

