first commit
This commit is contained in:
25
templates/autoapp/auto_list.html
Normal file
25
templates/autoapp/auto_list.html
Normal file
@@ -0,0 +1,25 @@
|
||||
<h2>Список автомобилей</h2>
|
||||
<a href="{% url 'add_auto' %}" class="btn btn-success mb-3">Добавить автомобиль</a>
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Марка</th>
|
||||
<th>Модель</th>
|
||||
<th>Год</th>
|
||||
<th>Цвет</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for auto in autos %}
|
||||
<tr>
|
||||
<td>{{ auto.brand }}</td>
|
||||
<td>{{ auto.model }}</td>
|
||||
<td>{{ auto.year }}</td>
|
||||
<td>{{ auto.color|default:"—" }}</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr><td colspan="4">Автомобили пока не добавлены</td></tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
Reference in New Issue
Block a user