views:

35

answers:

1

Hello I can't think of a way to test this and was hoping someone here knew the answer... I'm storing some request-specific data in os.environ, and was wondering if that data was going to leak to other requests. Does anyone know?

Yes I realize that it's normal to use request.environ for this, and usually I do, but I want to store the currently authorized user ID (I'm using custom auth, not GAE auth) inside os.environ so that the models know the currently logged in user (remember, they don't have access to request.environ) without me having to pass the request object to just about every single model method.

any help would be greatly appreciated Ian

+2  A: 

Ah-ha! I hadn't searched hard enough, this question has already been answered...

http://stackoverflow.com/questions/2259727/request-aware-code-in-google-app-engine-os-environ

Ian Charnas