42 lines
1003 B
HTML
42 lines
1003 B
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Hello World</title>
|
|
</head>
|
|
<body>
|
|
<!-- Input -->
|
|
<h1>Hello World</h1>
|
|
{% if status %}
|
|
<form action="" method="post">
|
|
<select name="material">
|
|
{% for item in materials %}
|
|
<option value="{{ item['material'] }}">{{ item['material'] }}</option>
|
|
{% endfor %}
|
|
</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>
|
|
|