quetz-mod_python-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gregory (Grisha) Trubetskoy" <gri...@apache.org>
Subject Re: get_session(), req.session, req.form and MODPYTHON-38
Date Mon, 13 Mar 2006 15:02:40 GMT

On Mon, 13 Mar 2006, Graham Dumpleton wrote:

> Thus I want a documented convention that if a handler is going to use
> util.FieldStorage, that it should before doing so, first check whether
> an existing instance resides as req.form and use that instead.

I'm not sure if this is a good example - req.form is something specific to 
the publisher. Rather than perhaps documenting it as you suggest, 
util.FieldStorage can take it upon itself to create a req.form so that 
subsequent attempts to instantiate it just return req.form. (This is just 
an example, I'm not 100% sure that I having FS do this makes sense - seems 
like a good idea).

> Similarly, if a handler is going to create a Session object, that it
> look for an existing instance as req.session and again use that instead.

OR, the Session module would know to look for a req.session, in which case 
the handlers wouldn't need to worry about it.

(One thing to watch out for would be that mutliple concurrent sessions in 
the same request is a possibility)

Grisha

Mime
View raw message