import logging from flask import Flask from flask.ext.principal import Principal from flask.ext.login import LoginManager app = Flask(__name__) logger = logging.getLogger(__name__) Principal(app, use_sessions=True) app.secret_key = '1cb18882-6d12-440d-a4cc-b7430fb5f884' login_manager = LoginManager() login_manager.init_app(app) login_manager.login_view = 'signin'