diff options
author | Michaël Ball <michael.ball@gmail.com> | 2015-11-27 19:33:39 +0000 |
---|---|---|
committer | Michaël Ball <michael.ball@gmail.com> | 2015-11-27 19:33:39 +0000 |
commit | 2ef755ad3d15f1ccce1cc9f6e5020bff35a2216e (patch) | |
tree | 729dc743a762f2511a61f7dbd30bdc8a2e0ba486 /mach2.py | |
parent | db7de872c4caf8d67784ad257551598a3a0e6035 (diff) |
Login manager
Diffstat (limited to 'mach2.py')
-rw-r--r-- | mach2.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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() |