On 5/26/05, Damjan <[EMAIL PROTECTED]> wrote:
> What's the quixote-ic way of getting the HTTP_REFERER?
Try request.environ.get('HTTP_REFERER'). The "environ" attribute is a
dict containing the CGI environment variables.
> Or otherwise, how do I get back from a login or logut URL?
Repeated login failures at the login URL will cause the Referer to
refer to the login URL itself, so you need to capture the original
Referer and hold onto it throughout the login process. A common
approach is to use a hidden field on the login form, something like.
def [html] login_form():
....
orig_url = request.form.get('resource_url',
request.environ.get('HTTP_REFERER', ''))
'<input type="hidden" name="resource_url" value="%s">' % orig_url
....
-- Graham
_______________________________________________
Quixote-users mailing list
[email protected]
http://mail.mems-exchange.org/mailman/listinfo/quixote-users