[Twisted-Python] Woven and sessions

Edmund Dengler edmundd at eSentire.com
Fri Aug 8 01:19:53 EDT 2003


Okay, been playing around with the session stuff. Still trying to get my
head around how ths is structured.

Created a site. Created a single child "xxx". Created a session wrapped
child "yyy".

Now,
   "http://localhost:8080/xxx/session-init/yyy"
will cause a cookie to be loaded, and a redirect to
   "http://localhost:8080/xxx/yyy?__session_just_started__=1"
if I accept the cookie.  Rejecting the cookie causes something akin to
   "http://localhost:8080/xxx/e11a075ad25656dca2b90022507746b6/yyy"
to be loaded.

If I type:
   "http://localhost:8080/xxx/yyy"
then I get to the appropriate page, with no cookie loaded.

Question 1: Can I suppress the "__session_just_started=1"?
Question 2: Can I force a session cycle (ie, force /xxx/yyy to have a
session?

I also noted a page talking about sandbox and pathargs, and : separated
arguments. Is this available, or should I look at creating a custom
resource?

What I am looking to do at the end is support sessioning whether or not
cookies are being allowed, and to allow URLs to be taken.

Question 3: I assume that all of this works similarly for perspective
wrappers? I was trying one Guard example I found on the net, and I am
having trouble actually causing the login page to appear (basically, I am
using the "perspective-init" in the URL, and I seem to get some other web
page with three input fields, rather than the supposedly specified login
page).

Aside Question: Is there a way to setup default error pages? I checked the
How To's and looked in the archives for a simple example, and couldn't
find any.

Regards!
Ed





More information about the Twisted-Python mailing list