Tune in next week when some community member writes a post entitled
"Chris Withers Considered Harmful" !


On Feb 27, 11:40 am, Chris Withers <ch...@simplistix.co.uk> wrote:
> Hi All,
>
> I'm writing a SQLAlchemy SessionExtension based on this pattern:
>
> http://www.sqlalchemy.org/trac/browser/examples/versioning/history_me...
>
> So, in the listener, I want to record the user that made the change.
> How should I get hold of the currently authenticated user?
>
> The only way I can think of is calling
> pyramid.threadlocal.get_current_request inside the before_flush method
> of the VersionedListener, but having read:
>
> http://docs.pylonsproject.org/projects/pyramid/1.0/narr/threadlocals....
>
> 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?
>
> cheers,
>
> 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