template.html
{{ objects.0.name }}
template.html
<table class="table table-striped">
<thead class="thead-dark">
<tr>
<th scope="col">#</th>
<th scope="col">Name</th>
</tr>
</thead>
<tbody>
{% for object in object_list %}
<tr>
<th scope="row">{{ forloop.counter }}</th>
<td>{{ object.name }}</td>
</tr>
{% endfor %}
</tbody>
</table>
Aktualisieren Sie, wann immer Sie kommen
Recommended Posts