Ejemplo n.º 1
0
def flask(dbtransaction):
    fun = lambda self: json.loads(self.data.decode('utf-8'))
    flask_app.response_class.json = property(fun)
    app_web_setup(flask_app, True)
    with flask_app.test_request_context():
        with flask_app.test_client() as client:
            yield client
Ejemplo n.º 2
0
from touchroute.web import flask_app, app_web_setup
from touchroute.config import get_config

current_config = get_config()
_run_debug_server = __name__ == '__main__'
_enable_debugging_features = _run_debug_server or current_config.DEBUG

app_web_setup(flask_app, _enable_debugging_features)


if _run_debug_server:
    flask_app.run(host='0.0.0.0', debug=True)