I seem to need the Django HttpRequest object in functions that are
called by view functions.
I could pass the request, but I'm thinking of trying to create a
closure in middleware so that
I can access the request object (and maybe other objects) from
anywhere.
This seems like it's stretching the django architecture a bit -- not
sure if I do this or if I should do this.
I'm still new to python and django, so I thought I'd solicit advice
first.

I'm thinking that the django middleware will access the request object
and create a closure.
I think I can use a classmethod for the closure so I can access it
from anywhere.
This will create a new object for every request -- I'm assuming that
it will not impact
performance but I'm not sure.

Any thoughts?

--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to