title: Jinja2 Template - for loop
body: <p>didn't find another post which has the similar problem, I'm trying to generate some checkboxes with flask and wtforms, at the moment I've got this piece of code:</p>
  
  <pre><code>&lt;div class="control-group"&gt;
      &lt;p&gt;&lt;strong&gt;Check the enabled BRI Ports&lt;/strong&gt;&lt;/p&gt;
      &lt;label class="checkbox inline"&gt;
          {{ form.bri1(value=1) }} {{ form.bri1.label }}
      &lt;/label&gt;
      &lt;label class="checkbox inline"&gt;
          {{ form.bri2(value=1) }} {{ form.bri2.label }}
      &lt;/label&gt;
      &lt;label class="checkbox inline"&gt;
          {{ form.bri3(value=1) }} {{ form.bri3.label }}
      &lt;/label&gt;
      &lt;label class="checkbox inline"&gt;
          {{ form.bri4(value=1) }} {{ form.bri4.label }}
      &lt;/label&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>This works so far, but now I try to do this with a simple for-loop like:</p>
  
  <pre><code>&lt;div class="control-group"&gt;
      &lt;p&gt;&lt;strong&gt;Check the enabled BRI Ports&lt;/strong&gt;&lt;/p&gt;
      {% for n in range(1,6) %}
      &lt;label class="checkbox inline"&gt;
          {{ form.brin.label }}
      {% endfor %}
  &lt;/div&gt;
  </code></pre>
  
  <p>I tried with (), {} and {{}} ... is this even possible?</p>