from ..defaults import get_default_db_uri
from .tables import metadata
+from .multilang import MultilangSession
def connect(uri=None, session_args={}, engine_args={}, engine_prefix=''):
all_session_args = dict(autoflush=True, autocommit=False, bind=engine)
all_session_args.update(session_args)
- sm = orm.sessionmaker(**all_session_args)
+ sm = orm.sessionmaker(class_=MultilangSession, **all_session_args)
session = orm.scoped_session(sm)
return session