title: How to break “for loop” in Django template
body: <p>My code is:</p>
  <pre><code>{% for key, value in section.items %}
      {% for key_t, value_t in title.items %}
              {% if value_t.section_id == key|add:&quot;0&quot; %}
                   &lt;li class=&quot;nav-item-header&quot;&gt;&lt;div class=&quot;text-uppercase font-size-xs line-height-xs&quot;&gt; 
                   {{value.title}}&lt;/div&gt; &lt;i class=&quot;icon-menu&quot; title=&quot;Tables&quot;&gt;&lt;/i&gt;&lt;/li&gt;
              {% endif %}
      {% endfor %}
  {% endfor %}
  </code></pre>
  <p>I want to break the for loop when if the condition is true. like as</p>
  <pre><code>{% for key, value in section.items %}
      {% for key_t, value_t in title.items %}
              {% if value_t.section_id == key|add:&quot;0&quot; %}
                   &lt;li class=&quot;nav-item-header&quot;&gt;&lt;div class=&quot;text-uppercase font-size-xs line-height-xs&quot;&gt; 
                   {{value.title}}&lt;/div&gt; &lt;i class=&quot;icon-menu&quot; title=&quot;Tables&quot;&gt;&lt;/i&gt;&lt;/li&gt;
              {{break}}
              {% endif %}
      {% endfor %}
  {% endfor %}
  </code></pre>
  <p>How is it possible? please help me...</p>