Exemple #1
0
def main(global_config, **settings):
    # This function is a 'paste.app_factory' and returns a WSGI
    # application.

    from kotti.resources import initialize_sql
    config = base_configure(global_config, **settings)
    engine = engine_from_config(config.registry.settings, 'sqlalchemy.')
    initialize_sql(engine)
    return config.make_wsgi_app()
Exemple #2
0
def main(global_config, **settings):
    # This function is a 'paste.app_factory' and returns a WSGI
    # application.

    from kotti.resources import initialize_sql
    config = base_configure(global_config, **settings)
    engine = engine_from_config(config.registry.settings, 'sqlalchemy.')
    initialize_sql(engine)
    return config.make_wsgi_app()
Exemple #3
0
def _initTestingDB():
    from sqlalchemy import create_engine
    from kotti.resources import initialize_sql

    database_url = testing_db_url()
    session = initialize_sql(create_engine(database_url), drop_all=True)
    return session
Exemple #4
0
def _initTestingDB():
    from sqlalchemy import create_engine
    from kotti.resources import initialize_sql

    database_url = testing_db_url()
    session = initialize_sql(create_engine(database_url), drop_all=True)
    return session
Exemple #5
0
def _init_testing_db():
    from sqlalchemy import create_engine
    from kotti import get_settings
    from kotti.resources import initialize_sql

    database_url = testing_db_url()
    get_settings()["sqlalchemy.url"] = database_url
    session = initialize_sql(create_engine(database_url), drop_all=True)
    return session
Exemple #6
0
def _init_testing_db():
    from sqlalchemy import create_engine
    from kotti import get_settings
    from kotti.resources import initialize_sql

    database_url = testing_db_url()
    get_settings()["sqlalchemy.url"] = database_url
    session = initialize_sql(create_engine(database_url), drop_all=True)
    return session
Exemple #7
0
def _initTestingDB():
    from sqlalchemy import create_engine
    session = initialize_sql(create_engine('sqlite://'))
    return session