switch to SQLAlchemy 0.5 syntax for transactional sessions
This commit is contained in:
parent
72a02a6e95
commit
475c9de3b4
1 changed files with 1 additions and 1 deletions
|
@ -12,7 +12,7 @@ log = logging.getLogger(__name__)
|
||||||
def init_model(engine):
|
def init_model(engine):
|
||||||
"""Call me before using any of the tables or classes in the model."""
|
"""Call me before using any of the tables or classes in the model."""
|
||||||
|
|
||||||
sm = orm.sessionmaker(autoflush=True, transactional=True, bind=engine)
|
sm = orm.sessionmaker(autoflush=True, autocommit=False, bind=engine)
|
||||||
|
|
||||||
meta.engine = engine
|
meta.engine = engine
|
||||||
meta.Session = orm.scoped_session(sm)
|
meta.Session = orm.scoped_session(sm)
|
||||||
|
|
Loading…
Reference in a new issue