[albatross-users] Summary of Auth App Example
Sheila King
sheila at thinkspot.net
Tue May 27 19:36:12 EST 2003
Hello,
I want to summarize all my blathering on this list from this past weekend.
First of all, thank you to Gregory Bond who sent me a private email in
response to my questions in
Message-ID: <63873084.1053822572 at SHEILA-LAPTOP>
and told me that I had not drawn the correct conclusions about session
variables.
Here is what I think I now understand about session variables:
Once you save a session variable, unless you explicitly remove it from the
session, it is updated automatically with the current value that it has in
the context's local namespace at the end of the request cycle.
A variable can be updated more than once in the local namespace during a
request cycle. Whatever its last value before the session is saved, that is
the value that will be saved in the session.
Hmm, just now that made me wonder...if the variable is not in the local
namespace when the session is saved, does that mean the session variable
will store a value of "none" or not be updated? I do not know the answer to
that one.
If the session is removed, the app will redirect to the "start page" on the
next request cycle.
I've put an updated copy of my practice app here:
http://www.mathxy.com/cgi-bin/enhauth/myapp.py
with the source files and a zip archive located in this directory:
http://www.mathxy.com/www/enhauth/
I wouldn't probably even bother with my earlier example. I should go back
and look at that code again...it probably could use some re-writing.
Anyhow, in this last version, I have successfully over-ridden the
load_badurl_template. My problems with that were most likely a result of my
poor understanding of the local name space and other scoping issues related
to the use of albatross tags in .html templates.
I've also over-ridden the write_headers function so that once logged out,
using the back button to return to the main account page redirects to an
expired session page. I've tested on three different browsers so far, and
seems to work. Of course, it will need more testing.
Thanks to everyone for the help. I feel ready to tackle other parts of my
project, now. :)
--
Sheila King
http://www.thinkspot.net/sheila/
http://www.k12groups.org
More information about the Albatross-users
mailing list