for item in items if forloop first td class categorySizes rowspan item

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
{% for item in items %}
{% if forloop.first %}
<td class="categorySizes" rowspan="2">{{ item.thickness }}×{{ item.width }}</td>
<td class="entryType">{{ item.get_kind_display }}</td>
<td class="entryPrice catalogPrices">{{ item.price_m3 }}</td>
<td class="entryPrice catalogPrices">{{ item.price_m2 }}</td>
<td class="entryPrice catalogPrices">{{ item.price_m }}</td>
</tr>
{% else %}
<tr>
<td class="entryType">{{ item.get_kind_display }}</td>
<td class="entryPrice catalogPrices">{{ item.price_m3 }}</td>
<td class="entryPrice catalogPrices">{{ item.price_m2 }}</td>
<td class="entryPrice catalogPrices">{{ item.price_m }}</td>
</tr>
{% endif %}
{% endfor %}