Запрос по материалу заготовки

Доработать возвращение в меню запросов
This commit is contained in:
Anton Kamalov
2024-10-22 00:09:03 +03:00
parent 19a5869d30
commit 339a55f8da
7 changed files with 53 additions and 12 deletions

View File

@@ -5,13 +5,37 @@
<title>Hello World</title>
</head>
<body>
<!-- Input -->
<h1>Hello World</h1>
{% if status %}
<form action="" method="post">
<select name="categories" size="10" multiple>
{% for category in categories %}
<option value="{{ category }}">{{ category }}</option>
<select name="material">
{% for item in materials %}
<option value="{{ item['material'] }}">{{ item['material'] }}</option>
{% endfor %}
</select>
</select>
<input type="submit" value="Отправить">
</form>
{% else %}
<!-- Output -->
{% if result_table %}
<table>
<tr>
{% for item in result_table[0] %}
<th>{{ item }}</th>
{% endfor %}
</tr>
{% for item in result_table[1] %}
<tr>
<td>{{ item['material'] }}</td>
<td>{{ item['weight'] }}</td>
<td>{{ item['price'] }}</td>
<td>{{ item['count'] }}</td>
</tr>
{% endfor %}
</table>
{% endif %}
{% endif %}
</body>
</html>