On 28/02/2011 18:42, Tres Seaver wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/28/2011 12:53 PM, Chris Withers wrote:
On 28/02/2011 16:58, Tres Seaver wrote:
I'm worried that I'm being evil. Am I being evil?
How else can I get hold of Pyramid's notion of the current user id
inside a SessionExtension?

The "approved" way to share request-specific information is to just pass
the request:  in this case, the obvious candidate is to make the request
an attribute of the event.

What event are you referring to?

The one published to your listener.

What listener?

I'm using a SessionExtension:

http://www.sqlalchemy.org/docs/orm/interfaces.html#session-events

The only way I can think to get request there would be to try and stick it on either the model object, or the session object, both of which feel even more hacky than getting it from a thread local...

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
           - http://www.simplistix.co.uk

--
You received this message because you are subscribed to the Google Groups 
"pylons-devel" group.
To post to this group, send email to pylons-devel@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-devel?hl=en.

Reply via email to