title: Django template - set variable in for loop
body: <p>I am using this code in my templatetags:</p>
  
  <p><a href="http://pastie.org/3530409" rel="nofollow">http://pastie.org/3530409</a></p>
  
  <p>And I know for context problem and bad design (that this logic should not be in view) but I need in template solution for this:</p>
  
  <pre><code>{% for tag in page.tagname_list %}
          {% ifequal tag "wiki" %}
              {% set howto = 1 %} 
          {% endifequal %}
  {% endfor %}
  </code></pre>
  
  <p>So I can use howto variable latter for my view logic.</p>
  
  <p>Is there any way to do this in view templates, without model modification ?
  If answer yes, please provide some solution...</p>
  
  <p>Thanks a lot.</p>