My current goal is:
To create a
<div class="row-fluid center">
and only display a maximum of 3 elements from list.dias.all. However, I am struggling to come up with the correct code.
<div class="row-fluid center" id="{{list.dias.all.count}}">
{% for dia in list.dias.all %}
<div class="span4" id="element" >
<div>
<h6 style="color: #9937d8">{{dia.tipo_dias.description}}</h6>
<small style="color: #b2e300">{{ dia.title_yt }}</small>
</div>
<div id="another div"></div>
</div>
{% endfor %}
</div>
This might be a basic question, but I am unsure whether it would be best to use Django, django-templates, or jQuery to solve this issue.
Thank you in advance
-- edited
Thank you! What I actually want to do is iterate through each set of three elements and create a new row for them. I believe I am getting close to finding the solution now.
If there are 30 elements in a list, I want to create a new row for every 3 elements except for the first 3.