title: Is django can modify variable value in template?
body: <p>I want to write a template that renders something only one time.</p>
  
  <p>My idea is to create a flag variable to check it is the first time.</p>
  
  <p>My code</p>
  
  <pre><code>{% with "true" as data %}
      {% if data == "true" %}
          //do something
          ** set data to "false" **
      {% else %}
          //do something
      {% endif %}
  {% endwith %}
  </code></pre>
  
  <p>I don't know <strong>How to change a variable in django template.</strong> Is it possible? Or is there a better way to do this?</p>