Answer the question
In order to leave comments, you need to log in
How to make numbering in template in table?
<div class="div_table">
<table>
<tbody>
{% for getLecture in getLectures%}
<tr>
<td>1</td>
<td>
<a href="{{ getLecture.pdf.url }}" target="_blank"> {{ getLecture.title }} </a>
</td>
<td>
<a href="{% url 'main:problemlist' %}">Задачи по лекции</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
Answer the question
In order to leave comments, you need to log in
https://docs.djangoproject.com/en/1.11/ref/templat...<td>{{ forloop.counter }}</td>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question