From e2684ed2a354f358ba87dfbdf25a9f76bd96edb6 Mon Sep 17 00:00:00 2001 From: Anton Kamalov Date: Tue, 22 Oct 2024 22:09:02 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BE=D0=B7=D0=B4=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BE=D1=82=D0=B4=D0=B5=D0=BB=D1=8C=D0=BD=D0=BE=D0=B9?= =?UTF-8?q?=20=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8=D1=86=D1=8B=20=D0=BE?= =?UTF-8?q?=D1=88=D0=B8=D0=B1=D0=BA=D0=B8=20=D0=B0=D0=B2=D1=82=D0=BE=D1=80?= =?UTF-8?q?=D0=B8=D0=B7=D0=B0=D1=86=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/Auth/auth.py | 2 +- App/Auth/auth_route.py | 2 +- App/Auth/templates/error.html | 12 ++++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 App/Auth/templates/error.html diff --git a/App/Auth/auth.py b/App/Auth/auth.py index d7415b5..01bc734 100644 --- a/App/Auth/auth.py +++ b/App/Auth/auth.py @@ -27,4 +27,4 @@ def auth(): }) return redirect(url_for('index')) else: - return auth_data.error_message + return render_template('error.html', error_message=auth_data.error_message) diff --git a/App/Auth/auth_route.py b/App/Auth/auth_route.py index 4472666..3781ee1 100644 --- a/App/Auth/auth_route.py +++ b/App/Auth/auth_route.py @@ -11,5 +11,5 @@ def route(db_config, input_data, sql_provider, name) -> InfoRespronse: print("sql = ", _sql) result = select_list(db_config, _sql) if result is None: - return InfoRespronse(result, error_message = 'Ошибка на этапе авторизации', status=False) + return InfoRespronse(result, error_message = 'Произошла ошибка на этапе авторизации :(', status=False) return InfoRespronse(result, error_message='', status=True) \ No newline at end of file diff --git a/App/Auth/templates/error.html b/App/Auth/templates/error.html new file mode 100644 index 0000000..553b510 --- /dev/null +++ b/App/Auth/templates/error.html @@ -0,0 +1,12 @@ + + + + + Ошибка + + +

Сожалеем

+

{{ error_message }}

+

Вернуться

+ +