title: Display each element of a queryset separated with an <br> inside of a <td> in django template
body: <p><strong>Model</strong></p>
  <pre><code>
  class Tesis(models.Model):
      descripcion = models.CharField(max_length=50, blank=False, null=True)
      año = models.PositiveSmallIntegerField(blank=False, null=True)
      carrera = models.ForeignKey(
          Carrera, related_name=&quot;tesis_carrera&quot;, on_delete=models.SET_NULL, null=True)
      tutor = models.ForeignKey(
          Tutor, on_delete=models.SET_NULL, null=True, related_name=&quot;tutor_tesis&quot;)
      alumno = models.ManyToManyField(Alumno, related_name=&quot;alumno_tesis&quot;)
  
      class Meta:
          verbose_name_plural = &quot;Tesis&quot;
          verbose_name = &quot;Tesis&quot;
  
      def __str__(self):
          return self.descripcion
  </code></pre>
  <p><strong>VIEW</strong></p>
  <pre><code>class Listar_TesisListView(LoginRequiredMixin,ListView):
  
     queryset = Tesis.objects.all()
     template_name =  &quot;listar_tesis_cargadas.html&quot;
     model = Tesis
  </code></pre>
  <p><strong>TEMPLATE</strong></p>
  <pre><code>&lt;div class=&quot;table-container&quot;&gt;
            &lt;table class=&quot;table&quot;&gt;
              &lt;thead&gt;
                &lt;tr&gt;
                  &lt;th class=&quot;has-text-centered&quot; colspan=&quot;6&quot;&gt;
                    LISTADO DE TESIS
                  &lt;/th&gt;
                &lt;/tr&gt;
                &lt;th&gt;DESCRIPCIÓN&lt;/th&gt;
                &lt;th&gt;AÑO&lt;/th&gt;
                &lt;th&gt;CARRERA&lt;/th&gt;
                &lt;th&gt;TUTOR&lt;/th&gt;
                &lt;th&gt;ALUMNO&lt;/th&gt;
              &lt;/thead&gt;
              &lt;tbody&gt;
                {% for item in object_list %}
                &lt;tr&gt;
                  &lt;td&gt;{{ item.descripcion }}&lt;/td&gt;
                  &lt;td&gt;{{ item.año}}&lt;/td&gt;
                  &lt;td&gt;{{ item.carrera }}&lt;/td&gt;
                  &lt;td&gt;{{ item.tutor}}&lt;/td&gt;
                  &lt;td&gt;&lt;{{item.alumno.all}}&lt;/td&gt;
                  
                  
                  {% for al in item.alumno.all %}
                                         
                  &lt;td&gt;  {{al}} &lt;br&gt; &lt;/td&gt;
                  {% endfor %} 
                 &lt;/tr&gt;
                {% endfor %}
              &lt;/tbody&gt;
            &lt;/table&gt;
          &lt;/div&gt;
  </code></pre>
  <p><strong>WHAT I GET</strong></p>
  <p><a href="https://i.stack.imgur.com/eOgUV.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eOgUV.jpg" alt="enter image description here" /></a></p>
  <p><strong>WHAT I WANT</strong></p>
  <p>In the same <code>&lt;td&gt;</code> when the alumno queryset has 2 elements print the first and then make a breaking line and print the next one. Like this:
  <br />
  <strong>Alumno Depru1</strong>
  <br />
  <strong>Alu2 depru2</strong>
  <br />
  <br />
  I also tried this:</p>
  <pre><code>{% if item.alumno.count &gt; 1  %}
  {% for al in item.alumno.all %}
                                         
  &lt;td&gt;  {{al}} &lt;br&gt;{{al}} &lt;/td&gt;
  {% endfor %} 
  {% else %}
  {% for al in item.alumno.all %}
                                               
  &lt;td&gt; {{al}} &lt;/td&gt;
  {% endfor %} 
  {% endif %}
  </code></pre>
  <p>and I get:
  <a href="https://i.stack.imgur.com/6vyLV.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6vyLV.jpg" alt="enter image description here" /></a></p>
  <p><strong>Also tried:</strong></p>
  <pre><code>% for al in item.alumno.all %}
  &lt;td&gt;  {{al.0}} &lt;br&gt;{{al.1}} &lt;/td&gt;
  {% endfor %} 
  </code></pre>
  <p><strong>QUESTIONS</strong></p>
  <ol>
  <li>How can I access the elements of the queryset separately and print them in the format {{al.0}} or {{al[0]}}</li>
  <li>Is there a better way of doing this kind of logic in the views and just pass it to the template ?</li>
  </ol>