Example #1
0
def setup_app(pecan_config=PECAN_CONFIG):
    app_hooks = [DBHook(db.get_connection_from_config(cfg.CONF))]
    pecan.configuration.set_config(dict(pecan_config), overwrite=True)
    app = pecan.make_app(pecan_config['app']['root'],
                         debug=CONF.debug,
                         hooks=app_hooks,
                         guess_content_type_from_ext=False)
    return app
Example #2
0
def setup_app(pecan_config=PECAN_CONFIG):
    app_hooks = [DBHook(db.get_connection_from_config(cfg.CONF))]
    pecan.configuration.set_config(dict(pecan_config), overwrite=True)
    app = pecan.make_app(
        pecan_config['app']['root'],
        debug=CONF.debug,
        hooks=app_hooks,
        guess_content_type_from_ext=False
    )
    return app
Example #3
0
def dbsync():
    service.prepare_service()
    db.get_connection_from_config(cfg.CONF).upgrade()