I have am using a django custom tag to change the value of a variable.
But if I change the value in an if tag or a for tag after the end of
the  if/for tag django will show me the old value of the variable. Is
there something I can do about this?

{% for %}
    {{ varname }}  --> output is 50
    {% ifequal  somevalues %}
        {% changevariable varname 10 %}
        {{ varname }} --> this output is 10

    {% endifequal %}
    {{ varname }}  --> out is 50 instead of  10.
{% endfor %}


I use this code(just a small snippet):

def render(self, context):

     context[varname] = newvalue
     return ' '

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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