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
6 from wradmin.genshi import render_genshi_template
10 app.config.from_envvar('WRADMIN_SETTINGS')
14 """Opens a new database connection if there is none yet for the
15 current application context.
17 if not hasattr(g, 'db'):
18 g.db_engine = create_engine(app.config['DATABASE_URI'])
19 g.db = g.db_engine.connect()
23 @app.teardown_appcontext
25 """Closes the database again at the end of the request."""
32 return render_genshi_template('index.html')
35 @app.route("/rodelbahn/")
40 @app.route("/bericht/")