On 15 févr. 2011, at 17:58, Bzyczek <[email protected]> wrote: >> I am not aware of anything, but you can easily make a piece of middleware >> which generated a UUID then exposed this in the request object :) > > Yes I could, but then I must provide to all parts of my code request > object. I don't know how to build something like "global variable", > which will be safe regardless on server configuration (many > procesesses/threads of my app). Thread local set to an uuid4 by a middleware?
That should work as long as you know django will not multiplex requests within a given thread (a guarantee I can't give you, but as far as I know django does not use coroutines or tasklets) -- You received this message because you are subscribed to the Google Groups "Django users" 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-users?hl=en.

