Saturday, July 31, 2010

Re: Get request path without having a request object

I think perhaps I'll also put this problem another way. I need to
cache data against the current web request without having the Django
built request object.

On Jul 31, 4:56 pm, cootetom <coote...@gmail.com> wrote:
> Hi all,
>
> Is there any way of getting the request.path value without having the
> request object that Django pass's around. Is there something similar
> to os.environ for the web request where I can get the path?
>
> I'm developing an app that needs to cache data on a page basis but the
> data may come from any Python code that is run for the request or it
> may come from the template layer via custom template tags. I don't
> want to have to pass the request path around in order to eventually
> pass it to my caching code for use in the cache key. I just want to be
> able to find the request path from my caching code.
>
> Possible?

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

No comments:

Post a Comment