Passing context between templatetags, django
Posted
by Kasper Gadensgaard
on Stack Overflow
See other posts from Stack Overflow
or by Kasper Gadensgaard
Published on 2010-03-23T08:06:42Z
Indexed on
2010/03/23
9:33 UTC
Read the original article
Hit count: 568
Hi overflowers,
I am using django to create a web-application.
I have created a template in where I load a templatetag. In this templatetag i load another templatetag. From the template I pass context to the first templatetag, but the context is not available from the second templatetag (inside the first templatetag) - see below.
I hope this makes sense, and that one of you have the answer.
Thanks in advance
Regards
Kasper Gadensgaard
Template snippit:
{% load templatetags %}
{% some_tag argument %}
some_tag Templatetag:
{% load templatetags %}
{% some_other_tag another_argument %}
some_other_tag Templatetag: In this templatetag i am trying to access context to get user info i.e. using
request = context['request']
request.user
© Stack Overflow or respective owner