From dde722191e7956b8e6d875c55d6af451f00afbe0 Mon Sep 17 00:00:00 2001 From: Steve Nyemba Date: Thu, 20 Oct 2022 15:38:13 -0500 Subject: [PATCH] bug fixe, 404 and favicon --- index.py | 6 ++++-- templates/404.html | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/index.py b/index.py index 07ba38b..7547665 100644 --- a/index.py +++ b/index.py @@ -19,8 +19,10 @@ from jinja2 import Environment, BaseLoader _app = Flask(__name__) @_app.route('/favicon.ico') def favicon(): + global _config + return send_from_directory(os.path.join(_app.root_path, 'static/img'), - 'vanderbilt-logo.png', mimetype='image/vnd.microsoft.icon') + 'logo.png', mimetype='image/vnd.microsoft.icon') @_app.route("/") def _index (): @@ -39,7 +41,7 @@ def _index (): except Exception as e: _index_page = "404.html" pass - + print (_config ); return render_template(_index_page,**_args) @_app.route('/id/') diff --git a/templates/404.html b/templates/404.html index e69de29..e9e8dfe 100644 --- a/templates/404.html +++ b/templates/404.html @@ -0,0 +1,44 @@ + + + + + {{layout.header.title}} + + + + + + + + + + + + + + + + + + + + + + +
+ 404 +
+ \ No newline at end of file