How can I use for loop in HTML to display data in a table with format
So I'm a beginner and I'm using django and python. I created a table here and I want to display all data in a queryset. Plus I want to have 4 columns. So I want something like, for each four items in the queryset, create a and display the 4 items, but it seems like I can only do one item in each loop.
My code looks like this, and it's dipslaying one each row right now.
Is it possible to do this in html?
<table>
<thead>
<tr>
<th>Column1</th>
<th>Column1</th>
<th>Column1</th>
<th>Column1</th>
</tr>
</thead>
<tbody>
{% for user in users %}
<tr>
<td><a href=""><img src="{{user.img_url}}"></a></td>
<td>{{user.username}}</td>
<td>{{user.email}}</td>
<td>{{user.bookmarks.count}}</td>
</tr>
{% endfor %}
</tbody>
</table>