summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--api.py1
-rw-r--r--main.py4
2 files changed, 3 insertions, 2 deletions
diff --git a/api.py b/api.py
index e4df20b..5d37b26 100644
--- a/api.py
+++ b/api.py
@@ -1,4 +1,5 @@
from __main__ import app
+from __main__ import boiler
@app.route("/api/info")
def api_info():
diff --git a/main.py b/main.py
index 76c0f41..d6d6320 100644
--- a/main.py
+++ b/main.py
@@ -10,8 +10,6 @@ from threading import Thread
app = Flask(__name__)
-# Import API Script after Flask app exists
-import api
# Paramaterised location of database file
# Use of constant
@@ -34,6 +32,8 @@ if device.startswith("Raspberry Pi 4"):
else:
errors.device_error()
+# Import API Script after Flask app and boiler classexists
+import api
def main_page():
# paramaterised location of template in 'templates' folder