[Twisted-Python] woven authentications and connections.
syver at inout.no
Mon Oct 6 04:17:36 EDT 2003
Donovan Preston <dp at twistedmatrix.com> writes:
> On Oct 3, 2003, at 4:47 AM, Syver Enstad wrote:
> > I am in the process of implementing authentication for an intranet
> > application using woven. I will be storing the login information in
> > the session. On each request I will connect to the database and pass
> > the connection to the page handling the request. How do I know when
> > the request is finished so that I can close the connection?
> Overriding Page.pageRenderComplete should be what you want.
Thanks, I found another way by calling request.notifyFinished which
returns a deferred, I then add a callback to that deferred and it
seems to work fine. *The following is not a rethorical question, I am
just curious.* In what way is overriding Controller.pageRenderComplete
superior to my solution?
More information about the Twisted-Python