1 # http://flask.pocoo.org/
2 # FLASK_APP=wradmin FLASK_DEBUG=1 WRADMIN_SETTINGS=development.cfg python3 -m flask run
3 # FLASK_APP=wradmin WRADMIN_SETTINGS=production.cfg python3 -m flask run
4 from flask import Flask, send_from_directory, abort, g
5 from sqlalchemy.engine import create_engine
9 app.config.from_envvar('WRADMIN_SETTINGS')
13 """Opens a new database connection if there is none yet for the
14 current application context.
16 if not hasattr(g, 'db'):
17 g.db_engine = create_engine(app.config['DATABASE_URI'])
18 g.db = g.db_engine.connect()
22 @app.teardown_appcontext
24 """Closes the database again at the end of the request."""
31 return send_from_directory('templates', 'index.html')
34 @app.route("/rodelbahn/")
39 @app.route("/bericht/")