On Thu, 2006-07-06 at 02:02 -0700, Iain Duncan wrote:
> > Separate client hits might hit separate Python interpreter instances,
> > and each of those instances will have imported the global namespace on
> > their own, creating separate global namespaces.
> > 
> > So like Steven said, it's not safe to do anything in the global
> > namespace. If you need a per-session singleton, you can store it in
> > request.session. If you need a per-application singleton, then you're
> > going to have trouble...
> > 
> 
> Ok, so we're would be smart place to do housekeeping you want to have
> happen no matter what page is loaded? 

Middleware: http://www.djangoproject.com/documentation/middleware/

You can have functions that run prior to a request being passed along,
prior to a view function being called, after an exception and/or after a
response has been created, with full access to the request and response.

Regards,
Malcolm


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to