Даты как параметры + страница для ошибок

This commit is contained in:
Anton Kamalov
2024-10-24 20:35:06 +03:00
parent e1d0510669
commit e97300f860
4 changed files with 23 additions and 12 deletions

View File

@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Ошибка</title>
<link href="/static/css/main.css" type="text/css" rel="stylesheet">
</head>
<body>
<h1>Произошла ошибка</h1>
<p>{{ error_message }}.</p>
<a href="{{ url_for('index') }}"><button>На главную страницу</button></a>
</body>
</html>

View File

@@ -19,8 +19,8 @@
{% endfor %}
</select>
<p>Выберите даты:</p>
<p>с <input type="date" name="date_from" required min="2000-01-01" max="2024-12-31" id="date_from"></p>
<p>по <input type="date" name="date_to" required min="2000-01-01" max="2024-12-31" id="date_to"></p>
<p>с <input type="date" name="date_from" required min={{ date_from }} max={{ date_to }} id="date_from"></p>
<p>по <input type="date" name="date_to" required min={{ date_from }} max= {{ date_to }}" id="date_to"></p>
<input type="submit" value="Отправить">
</form>
<div class="return">