]> git.datanom.net - pwp.git/blob - app/__init__.py
Half way through migration away from sqlalchemy
[pwp.git] / app / __init__.py
1 from flask import Flask
2 from flask_bootstrap import Bootstrap
3 from config import DB_DRIVER, DB_PASSWORD, DB_USER, DB_DATABASE, DB_HOST, DB_PORT
4 from flask_login import LoginManager
5 from flask_wtf.csrf import CSRFProtect
6 app = Flask(__name__)
7 app.config.from_object('config')
8 lm = LoginManager()
9 lm.init_app(app)
10 lm.login_view = 'login'
11 bootstrap = Bootstrap(app)
12 csrf = CSRFProtect()
13 csrf.init_app(app)
14
15 from db import DB
16 db = DB(DB_PASSWORD, DB_DRIVER, DB_USER, DB_DATABASE, DB_HOST, DB_PORT)
17
18 from app import views, models
19 lm.anonymous_user = models.MyAnonymous
20
This page took 0.150594 seconds and 6 git commands to generate.