]>
Commit | Line | Data |
---|---|---|
e5424f29 MR |
1 | from flask import Flask |
2 | from flask_bootstrap import Bootstrap | |
fc01a3eb | 3 | from config import DB_DRIVER, DB_PASSWORD, DB_USER, DB_DATABASE, DB_HOST, DB_PORT |
e5424f29 MR |
4 | from flask_login import LoginManager |
5 | from flask_wtf.csrf import CSRFProtect | |
e5424f29 MR |
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 | ||
fc01a3eb MR |
15 | from db import DB |
16 | db = DB(DB_PASSWORD, DB_DRIVER, DB_USER, DB_DATABASE, DB_HOST, DB_PORT) | |
e5424f29 MR |
17 | |
18 | from app import views, models | |
19 | lm.anonymous_user = models.MyAnonymous | |
20 |