Re: Accessing current URI from template tag
On Jun 6, 10:27 am, Swaroop Shankar V <swaroo...@gmail.com> wrote:
> Hello All,
>
> Well my question is on how to get the current URI in a template tag.
You'll have to use a RequestContext in the views rendering the
templates where you use this templatetag, and activate the
django.core.context_processors.request context processor. Then it's
just a matter of passing either the whole context or just the request
(or even just the request URI) to you template tag.
--
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.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home