Exemplo n.º 1
0
def app(global_config, **kw):
    """ This function returns a repoze.bfg.router.Router object.
    
    It is usually called by the PasteDeploy framework during ``paster serve``.
    """
    db_string = kw.get('db_string')
    if db_string is None:
        raise ValueError("No 'db_string' value in application configuration.")

    initialize_sql(db_string, echo=True)
    return make_app(get_root, kelpie, options=kw)
Exemplo n.º 2
0
def _initTestingDB():
    from kelpie.models import initialize_sql
    session = initialize_sql('sqlite://')
    return session