mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-25 02:44:18 +00:00
Load config from 'config.py'.
This commit is contained in:
parent
f6e7b44863
commit
96fc8f4064
@ -1,7 +1,14 @@
|
|||||||
|
from config import config
|
||||||
from flask import Flask
|
from flask import Flask
|
||||||
|
|
||||||
|
|
||||||
def create_app():
|
def create_app(config_name):
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
app.config.from_object(config[config_name])
|
||||||
|
config[config_name].init_app(app)
|
||||||
|
|
||||||
|
@app.route('/')
|
||||||
|
def index():
|
||||||
|
return 'Opaque'
|
||||||
|
|
||||||
return app
|
return app
|
||||||
|
Loading…
Reference in New Issue
Block a user