Dennis Kerschus 14f63c00a4 First
2024-02-19 09:41:36 +01:00

34 lines
926 B
Plaintext

from env import *
from flask import Flask, render_template
def create_app(test_config=None):
# create and configure the app
FlowAnalyserMain = Flask(__name__, instance_relative_config=True)
#app.config.from_mapping(
## SECRET_KEY='dev',
# DATABASE=os.path.join(app.instance_path, 'flaskr.sqlite'),
#)
if test_config is None:
# load the instance config, if it exists, when not testing
# FlowAnalyserMain.config.from_pyfile('config.py', silent=True)
else:
# load the test config if passed in
# FlowAnalyserMain.config.from_mapping(test_config)
# ensure the instance folder exists
@FlowAnalyserMain.context_processor
def inject_debug():
return dict(debug=FlowAnalyserMain.debug)
# a simple page that says hello
@FlowAnalyserMain.route('/')
def hello():
return FlowTest.test()
FlowAnalyserMain=create_app()