Redirect after login with nevow guard
Peter Westlake <[email protected]> Fri, 04 Jan 2013 16:00:22 +0000
| Newsgroups | gmane.comp.python.twisted.web |
|---|---|
| Message-ID | <1357315222.22587.140661173414169.605E19F8@webmail.messagingengine.com> |
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.