durusmail: quixote-users: Re: Fwd: Re: [Quixote-users] Further simplification of session code
Fwd: Re: [Quixote-users] Further simplification of session code
2002-05-17
Re: Fwd: Re: [Quixote-users] Further simplification of session code
2002-05-17
Re: Fwd: Re: [Quixote-users] Further simplification of session code
2002-05-17
Re: Fwd: Re: [Quixote-users] Further simplification of session code
2002-05-17
Re: Fwd: Re: [Quixote-users] Further simplification of session code
Michael Watkins
2002-05-17
At 12:07 PM 5/17/2002 -0400, Greg Ward wrote:
>A shorter way to code that is:
>
>   referer = request.get_environ('HTTP_REFERER', "/")
>   if referer.find('/logon') == -1:

Yes, I missed the default parameter on get_environ. I'm sure I will be
doing a lot of refactoring over the next while. I should stop now re-read
all the Quixote source now that I've been using it a while.

The double whammy for me is this is my first project of any significance in
Python. Thankfully the deadlines are my own to set.

>...although I'm not sure why "/" is a more appropriate default value
>than "".

For this application I redirect users to the root page once logged in, if I
can't determine where they should be sent back to. Its a sanity thing, past
experience shows I get support email if I don't.



reply