2019-07-03 13:40:45 +00:00
|
|
|
from config import config
|
2019-07-04 09:10:38 +00:00
|
|
|
from flask import Flask, render_template
|
2019-07-03 08:31:23 +00:00
|
|
|
|
|
|
|
|
2019-07-03 13:40:45 +00:00
|
|
|
def create_app(config_name):
|
2019-07-03 08:31:23 +00:00
|
|
|
app = Flask(__name__)
|
2019-07-03 13:40:45 +00:00
|
|
|
app.config.from_object(config[config_name])
|
|
|
|
config[config_name].init_app(app)
|
|
|
|
|
|
|
|
@app.route('/')
|
|
|
|
def index():
|
2019-07-04 09:10:38 +00:00
|
|
|
return render_template('base.html.j2')
|
2019-07-03 08:31:23 +00:00
|
|
|
|
2019-07-04 13:17:51 +00:00
|
|
|
from .auth import auth as auth_blueprint
|
|
|
|
app.register_blueprint(auth_blueprint, url_prefix='/auth')
|
|
|
|
|
2019-07-03 08:31:23 +00:00
|
|
|
return app
|