Hi Thomas

> The methods of each middleware are called one for every request. If your
> changes need information from the request, that's the right place.
>
> If you want to add a method which should be added once the server (mod_python,
> scgi, ...) starts you can use this place too. But it is better if you use
> the module level of the middleware:
>
> MyMiddleWare.py
>
> foofunc() # executed on server start
>
> class MyMiddleWare:
>     def process_request(...):
>         # executed for every request.

Thanks for this info. What is this foofunc() (a method that can be
anyware in the django source?)

I have another question, when do I use middleware for additional
attribute to put place on the request object VS the request.session
objects?

Thanks
james


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to