We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5600ffc commit 06170f5Copy full SHA for 06170f5
app.py
@@ -23,15 +23,19 @@
23
24
import flask
25
26
-from set_root import set_root
27
# we need to set the root before we import the main_page as there are relative paths to this root (i.e. config files)
28
-set_root()
+import sys
+import os
29
+project_root = os.path.dirname(os.path.abspath(__file__))
30
+sys.path.insert(0, project_root)
31
+os.chdir(project_root)
32
33
from app_main_page import main_page
34
35
app = flask.Flask(__name__)
36
app.register_blueprint(main_page)
37
38
+application = app # application is the default name for mod_wsgi
39
40
if __name__ == "__main__":
41
app.run()
app.wsgi
0 commit comments