From 4d3a309940ac1924a54b9d38a7e4d90a7f794ffa Mon Sep 17 00:00:00 2001 From: pi3c Date: Mon, 30 Oct 2023 23:46:00 +0300 Subject: [PATCH] favicon url --- pyproger/app.py | 8 ++++++++ pyproger/templates/blog/base.html | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pyproger/app.py b/pyproger/app.py index 0dc952f..163ee75 100644 --- a/pyproger/app.py +++ b/pyproger/app.py @@ -184,4 +184,12 @@ def create_app(test_config=None): url = url_for("uploaded_files", filename=f.filename) return upload_success(url=url) + @app.route("/favicon.ico") + def favicon(): + return send_from_directory( + os.path.join(app.root_path, "static"), + "favicon.ico", + mimetype="image/vnd.microsoft.icon", + ) + return app diff --git a/pyproger/templates/blog/base.html b/pyproger/templates/blog/base.html index 9933140..e9d1186 100644 --- a/pyproger/templates/blog/base.html +++ b/pyproger/templates/blog/base.html @@ -7,7 +7,7 @@ {% block title %}{% endblock title %} - + {% for h in headers %} {{h.content | safe}} {% endfor %}