summaryrefslogtreecommitdiff
path: root/mach2.py
diff options
context:
space:
mode:
Diffstat (limited to 'mach2.py')
-rw-r--r--mach2.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/mach2.py b/mach2.py
index 1b3f068..dfe7452 100644
--- a/mach2.py
+++ b/mach2.py
@@ -25,6 +25,10 @@ config.read("mach2.ini")
app.config["DEBUG"] = config["DEFAULT"]["debug"]
+login_manager = LoginManager()
+login_manager.login_view = "login"
+login_manager.session_protection = "strong"
+
def get_db():
db = getattr(g, "_database", None)
@@ -159,4 +163,5 @@ if __name__ == "__main__":
config = configparser.ConfigParser()
config.read("mach2.ini")
- app.run(debug=config["DEFAULT"]["debug"])
+ login_manager.init_app(app)
+ app.run()