def make_app(conf, full_stack=True, static_files=True, **app_conf): ''' Initialise both the pylons and flask apps, and wrap them in dispatcher middleware. ''' load_environment(conf, app_conf) flask_app = make_flask_stack(conf, **app_conf) if six.PY2: pylons_app = make_pylons_stack(conf, full_stack, static_files, **app_conf) app = AskAppDispatcherMiddleware({ 'pylons_app': pylons_app, 'flask_app': flask_app }) else: app = flask_app # Set this internal test request context with the configured environment so # it can be used when calling url_for from tests global _internal_test_request_context _internal_test_request_context = flask_app._wsgi_app.test_request_context() return app
def make_app(conf, full_stack=True, static_files=True, **app_conf): ''' Initialise both the pylons and flask apps, and wrap them in dispatcher middleware. ''' pylons_app = make_pylons_stack(conf, full_stack, static_files, **app_conf) flask_app = make_flask_stack(conf) app = AskAppDispatcherMiddleware({'pylons_app': pylons_app, 'flask_app': flask_app}) return app
def make_app(conf, full_stack=True, static_files=True, **app_conf): ''' Initialise both the pylons and flask apps, and wrap them in dispatcher middleware. ''' pylons_app = make_pylons_stack(conf, full_stack, static_files, **app_conf) flask_app = make_flask_stack(conf) app = AskAppDispatcherMiddleware({ 'pylons_app': pylons_app, 'flask_app': flask_app }) return app