Adding favicon

This commit is contained in:
Siina Mashek 2022-12-15 13:03:38 +02:00
parent 023444f08a
commit 7a01cf6fae
2 changed files with 6 additions and 0 deletions

View file

@ -85,6 +85,7 @@ if not app.config["TESTING"]:
app.config.from_pyfile("config.py") app.config.from_pyfile("config.py")
app.jinja_loader = ChoiceLoader([ app.jinja_loader = ChoiceLoader([
FileSystemLoader(str(Path(app.instance_path) / "templates")), FileSystemLoader(str(Path(app.instance_path) / "templates")),
FileSystemLoader(str(Path(app.instance_path) / "static")),
app.jinja_loader app.jinja_loader
]) ])
@ -527,6 +528,11 @@ def robots():
Disallow: / Disallow: /
""" """
@app.route('/favicon.ico')
def favicon():
return send_from_directory(os.path.join(app.root_path, 'static'),
'favicon.ico', mimetype='image/vnd.microsoft.icon')
@app.errorhandler(400) @app.errorhandler(400)
@app.errorhandler(401) @app.errorhandler(401)
@app.errorhandler(404) @app.errorhandler(404)

BIN
static/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB