title: Django Break Loop in template
body: <p>Im currently displaying a table with values, and in case those values doesn't exist im displaying a button to introduce such values.
  The problem is that i need a break in the for loop but Django doesn't support break in templates.</p>
  
  <p>The current state is this:
  <a href="https://i.stack.imgur.com/wVVvq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wVVvq.png" alt="enter image description here"></a></p>
  
  <p>And the html for the table is the following:</p>
  
  <pre><code>&lt;table style="width:100%"&gt;
  &lt;tr&gt;
  &lt;th&gt;Num de aluno&lt;/th&gt;
     {% for quest in questionlist 
  &lt;th&gt; {{quest.question_id.q_discription}} &lt;/th&gt;
     {% endfor %}
  &lt;/tr&gt;
     {% for st in students %}
  &lt;tr&gt;
  &lt;td&gt; {{st.student_number}} &lt;/td&gt;
     {% for qt in questionlist %}
  &lt;td&gt;
  {%for tst in studentexamitems %}
     {% if qt == tst.qitem_id and st == tst.student_id  %}
        {{tst.qscore}}
     {% endif %}
  {% endfor %}
  &lt;a href="{% url 'newTableEntry' qt.id st.id %}"&gt;
     &lt;button type="button" class="btn btn-success btn-xs"&gt;
     &lt;span class="glyphicon glyphicon-plus"&gt;&lt;/span&gt;&amp;nbsp; Grade
     &lt;/button&gt;
  &lt;/a&gt;
  &lt;/td&gt;
  {% endfor %}
  &lt;/tr&gt;
  {% endfor %}
  &lt;/table&gt;
  </code></pre>
  
  <p>So the question is how do i remove the button in case of a existing grade, and keep the button in case of not existing?</p>