On Wednesday 29 December 2010 05:24:06 Russell Keith-Magee wrote:
> 
> As for "do we intend to solve this issue" -- you haven't been exactly
> clear as to what the issue *is* -- or rather, why it isn't already
> trivially solveable using completely standard OO techniques.
> 

The real issue, as I've seen it, is not in cases such as raised by the 
original poster, but in cases where the code that needs the request is located 
some distance in the call-chain below the code that has access to the request; 
then, solving the problem in the way Russell outlined involves having several 
places in the code which accept (and sometimes, as in Russell's example, even 
keep) a request object only so that they can pass it on.

As a concrete example, consider a situation where you have different pieces of 
code activated in order to generate a response, and now you want to add info 
from the request to your logging. I can think of no decent way to do that 
except for thread-locals and a middleware (and that's actually the way I've 
done it; I made sure that the middleware doesn't copy the whole request, just 
the pieces I need, but still).

My 2 cents,
        Shai.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to