Создание отдельной страницы ошибки авторизации
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
12
App/Auth/templates/error.html
Normal file
12
App/Auth/templates/error.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Ошибка</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Сожалеем</h1>
|
||||
<p>{{ error_message }}</p>
|
||||
<p><a href="{{ url_for('auth_bp.auth') }}">Вернуться</a></p>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user