Запрос по материалу заготовки
Доработать возвращение в меню запросов
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user