Первая попытка модельки
This commit is contained in:
45
templates/parts_list.html
Normal file
45
templates/parts_list.html
Normal 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 %}
|
||||
Reference in New Issue
Block a user