[Twisted-Python] Woven subpage handling redirect deferred, Help!?!

Syver Enstad syver at inout.no
Tue Oct 7 04:32:42 EDT 2003

Bill Gribble <grib at billgribble.com> writes:

> On Mon, 2003-10-06 at 08:43, Syver Enstad wrote:
> > Should I use a plain Resource rather than a woven page for this kind
> > of problem?
> I'm not using PB for auth (homebrew using the app's SQL db) but I think
> the general approach could be the same. 
> I have a separate Resource that is the top-level entry point of the
> app.  Its getChild method checks that the proper credentials are
> associated with the Session and if not redirects to the login page.  The
> handlers on the login page are responsible for setting up the
> credentials in the Session. 
> This works well for me.  The "gatekeeper" Resource is like 20 lines of
> code and keeps the page logic from having to know about the
> authentication scheme. 

This sounds like what I was thinking about. I am curious about how you
solve the actual login on the login page, my take would be that you'd
need to use a plain Resource or at least override render on a page to
be able to redirect after you have logged in to the database, no?

More information about the Twisted-Python mailing list