def dbsession(settings): generate_mappers() engine = get_engine(settings) truncate_tables(engine) session_factory = get_session_factory(engine) session = get_tm_session(session_factory, transaction.manager) yield session
def dbsession(settings): generate_mappers() engine = get_engine(settings, prefix="sqlalchemy_slave.") truncate_tables(engine) session_factory = get_session_factory(engine) session = get_tm_session(session_factory, transaction.manager) return session
def dbsession(settings): generate_mappers() engine = get_engine(settings) init_db(engine, settings['alembic_ini'], force=True) truncate_tables(engine) session_factory = get_session_factory(engine) session = get_tm_session(session_factory, transaction.manager) yield session