From 489eedf34edf4776ca06b74666799c6039a8bb0a Mon Sep 17 00:00:00 2001 From: Tristan Hill <878258+tbhi@users.noreply.github.com> Date: Tue, 7 Dec 2021 22:23:23 +0000 Subject: [PATCH] Flask 2 (#299) Co-authored-by: Tristan Hill --- changedetectionio/__init__.py | 4 ++-- requirements.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/changedetectionio/__init__.py b/changedetectionio/__init__.py index 118db95a..70465b01 100644 --- a/changedetectionio/__init__.py +++ b/changedetectionio/__init__.py @@ -685,7 +685,7 @@ def changedetection_app(config=None, datastore_o=None): @app.route("/favicon.ico", methods=['GET']) def favicon(): - return send_from_directory("/app/static/images", filename="favicon.ico") + return send_from_directory("static/images", path="favicon.ico") # We're good but backups are even better! @app.route("/backup", methods=['GET']) @@ -747,7 +747,7 @@ def changedetection_app(config=None, datastore_o=None): def static_content(group, filename): # These files should be in our subdirectory try: - return send_from_directory("static/{}".format(group), filename=filename) + return send_from_directory("static/{}".format(group), path=filename) except FileNotFoundError: abort(404) diff --git a/requirements.txt b/requirements.txt index c699fa80..48c578b4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -flask~= 1.0 +flask~= 2.0 eventlet>=0.31.0 validators