aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-04-05 13:24:26 +0300
committerFrederick Muriuki Muriithi2024-04-05 13:24:26 +0300
commit6c172fbaedcc40093db9874c067dd079678e4205 (patch)
treec6a62eda19d23f6ef0ba658f01fc4ad640dcd5b8
parentc8cc1ed563ae17dcedaff7eb20bc708e2fea0d7e (diff)
downloadgn-uploader-6c172fbaedcc40093db9874c067dd079678e4205.tar.gz
Add explicit route for favicon to reduce noise in the logs.
-rw-r--r--qc_app/entry.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/qc_app/entry.py b/qc_app/entry.py
index f166d4c..94bbd53 100644
--- a/qc_app/entry.py
+++ b/qc_app/entry.py
@@ -12,13 +12,22 @@ from flask import (
redirect,
Blueprint,
render_template,
- current_app as app)
+ current_app as app,
+ send_from_directory)
from qc_app.db import species
from qc_app.db_utils import with_db_connection
entrybp = Blueprint("entry", __name__)
+@entrybp.route("/favicon.ico", methods=["GET"])
+def favicon():
+ """Return the favicon."""
+ return send_from_directory(os.path.join(app.root_path, "static"),
+ "images/CITGLogo.png",
+ mimetype="image/png")
+
+
def errors(rqst) -> Tuple[str, ...]:
"""Return a tuple of the errors found in the request `rqst`. If no error is
found, then an empty tuple is returned."""