59 lines
2.1 KiB
HTML
59 lines
2.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="ru">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Список магазинов</title>
|
|
<style>
|
|
.head {
|
|
background: #fc3;
|
|
border: 2px solid black;
|
|
padding: 20px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div>
|
|
<form action='http://127.0.0.1:5000/showDiapason' method=get>
|
|
<input type=text size=20 name=firstRow>
|
|
<input type=text size=20 name=secondRow>
|
|
<input type=text size=20 name=firstColumn>
|
|
<input type=text size=20 name=secondColumn>
|
|
<input type=submit value='Вывод диапазона'>
|
|
</form>
|
|
</div>
|
|
<div>
|
|
<table>
|
|
<tr>
|
|
{% if firstColumn == 1 %}
|
|
<th class="head">Площадь магазина, кв. м, double</th>
|
|
{% endif %}
|
|
{% if firstColumn <= 2 and secondColumn >= 2 %}
|
|
<th class="head">Кол-во продукции, шт, int</th>
|
|
{% endif %}
|
|
{% if firstColumn <= 3 and secondColumn >= 3 %}
|
|
<th class="head">Кол-во посетителей в день, чел., int</th>
|
|
{% endif %}
|
|
{% if secondColumn == 4 %}
|
|
<th class="head">Кол-во проданных товаров, шт., int</th>
|
|
{% endif %}
|
|
</tr>
|
|
{% for elem in context %}
|
|
<tr>
|
|
{% if firstColumn == 1 %}
|
|
<td>{{ elem.store_area }}</td>
|
|
{% endif %}
|
|
{% if firstColumn <= 2 and secondColumn >= 2 %}
|
|
<td>{{ elem.items_available }}</td>
|
|
{% endif %}
|
|
{% if firstColumn <= 3 and secondColumn >= 3 %}
|
|
<td>{{ elem.daily_customer_count }}</td>
|
|
{% endif %}
|
|
{% if secondColumn == 4 %}
|
|
<td>{{ elem.store_sales }}</td>
|
|
{% endif %}
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
</div>
|
|
</body>
|
|
</html> |