Первая попытка модельки

This commit is contained in:
ack_ik
2026-02-10 13:40:12 +03:00
parent 8c38cb68c4
commit b27c685eb1
10 changed files with 285 additions and 0 deletions

45
templates/parts_list.html Normal file
View File

@@ -0,0 +1,45 @@
{% extends "base.html" %}
{% block title %}Список деталей{% endblock %}
{% block content %}
<div class="row">
<div class="col-md-3">
<h4>Фильтры</h4>
<form method="get">
{{ filter.form.as_p }}
<button type="submit" class="btn btn-primary">Применить</button>
</form>
</div>
<div class="col-md-9">
<h4>Результаты</h4>
<table class="table table-striped">
<thead>
<tr>
<th>Наименование</th>
<th>Децимальный номер</th>
<th>Тип</th>
<th>Толщина</th>
<th>Длина</th>
<th>Вес</th>
<th>Длина реза</th>
<th>Число проколов</th>
</tr>
</thead>
<tbody>
{% for part in filter.qs %}
<tr>
<td>{{ part.name }}</td>
<td>{{ part.decimal_number }}</td>
<td>{{ part.get_type_display }}</td>
<td>{{ part.thickness }}</td>
<td>{{ part.length }}</td>
<td>{{ part.weight }}</td>
<td>{{ part.cut_length }}</td>
<td>{{ part.number_of_punches }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endblock %}