[Twisted-web] Redirect after login with nevow guard

Peter Westlake peter.westlake at pobox.com
Fri Jan 4 11:00:22 EST 2013


I'm using nevow.guard, and when someone logs in I would like to send
them to the URL they originally typed. It's possible to do this by
posting to the URL guard.LOGIN_AVATAR + other stuff, e.g. to go to
http://example.com/foo/bar after logging in, the login page should post
to http://example.com/__login__/foo/bar. This works nicely. The problem
is, the login page doesn't know that the user was trying to go to
foo/bar. How can it get that information? I would have thought that it
would be available as the segments argument in locateChild, but for some
reason it isn't. Before logging in, the segments argument is always
empty.

Peter.





More information about the Twisted-web mailing list