From ddc9d74cf347d06ea9306ed8bc7e692b0fa10a60 Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Fri, 27 Nov 2015 12:28:44 +0100 Subject: [PATCH] Add login manager. --- accountant/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/accountant/__init__.py b/accountant/__init__.py index b6ad0a6..9e98299 100644 --- a/accountant/__init__.py +++ b/accountant/__init__.py @@ -18,17 +18,20 @@ from flask import Flask, redirect, url_for from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.bower import Bower from flask.ext.assets import Environment +from flask.ext.login import LoginManager # The app app = Flask(__name__, static_folder=None) app.config.from_pyfile('config.cfg') +# Configure login_manager +login_manager = LoginManager(app=app) + app.config['SQLALCHEMY_ECHO'] = app.debug db = SQLAlchemy(app) - # Must be after db declaration because the blueprints may need it. from .api import api from .frontend import frontend, frontend_js, frontend_css