Add login manager.
This commit is contained in:
parent
c4302e9b13
commit
ddc9d74cf3
@ -18,17 +18,20 @@ from flask import Flask, redirect, url_for
|
|||||||
from flask.ext.sqlalchemy import SQLAlchemy
|
from flask.ext.sqlalchemy import SQLAlchemy
|
||||||
from flask.ext.bower import Bower
|
from flask.ext.bower import Bower
|
||||||
from flask.ext.assets import Environment
|
from flask.ext.assets import Environment
|
||||||
|
from flask.ext.login import LoginManager
|
||||||
|
|
||||||
# The app
|
# The app
|
||||||
app = Flask(__name__, static_folder=None)
|
app = Flask(__name__, static_folder=None)
|
||||||
|
|
||||||
app.config.from_pyfile('config.cfg')
|
app.config.from_pyfile('config.cfg')
|
||||||
|
|
||||||
|
# Configure login_manager
|
||||||
|
login_manager = LoginManager(app=app)
|
||||||
|
|
||||||
app.config['SQLALCHEMY_ECHO'] = app.debug
|
app.config['SQLALCHEMY_ECHO'] = app.debug
|
||||||
|
|
||||||
db = SQLAlchemy(app)
|
db = SQLAlchemy(app)
|
||||||
|
|
||||||
|
|
||||||
# Must be after db declaration because the blueprints may need it.
|
# Must be after db declaration because the blueprints may need it.
|
||||||
from .api import api
|
from .api import api
|
||||||
from .frontend import frontend, frontend_js, frontend_css
|
from .frontend import frontend, frontend_js, frontend_css
|
||||||
|
Loading…
Reference in New Issue
Block a user