>>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
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
> 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-ses
On 7/6/06, Iain Duncan <[EMAIL PROTECTED]> wrote:
>
>
> > Code in the global namespace is executed at module import time.
> > These variables live as long as the python interpreter runs. (at least
> > thats my understanding of it)
> >
> > This is great for constants and such, but you can't rely on
> Code in the global namespace is executed at module import time.
> These variables live as long as the python interpreter runs. (at least
> thats my understanding of it)
>
> This is great for constants and such, but you can't rely on it to store
> state variables as, depending on the environm
On 07/05/06 03:34, Iain Duncan wrote:
> I stumbled on some behaviour that I'm sure is explained somewhere but
> not in the tutorials so I haven't found it.
>
> I made a global log object for debugging. I noticed instantiating
> objects in the view global name space executes before anything else i
I stumbled on some behaviour that I'm sure is explained somewhere but
not in the tutorials so I haven't found it.
I made a global log object for debugging. I noticed instantiating
objects in the view global name space executes before anything else in
the views module on page load, very useful for
7 matches
Mail list logo