Skip to content
Snippets Groups Projects
Verified Commit 9c6d79bf authored by Mark's avatar Mark
Browse files

Fix db_session object

parent f26fd025
No related branches found
No related tags found
No related merge requests found
......@@ -15,11 +15,11 @@ engine = create_engine('postgresql://{0}:{1}@{2}/{3}'.format(
db_user, db_password, db_host, db_name))
Session.configure(bind=engine, autocommit=True)
#db_session = scoped_session(sessionmaker(autocommit=False,
# autoflush=False,
# bind=engine))
db_session = scoped_session(sessionmaker(autocommit=False,
autoflush=False,
bind=engine))
##Base.query = Session.query_property()
Base.query = db_session.query_property()
def init_db(engine=engine):
# import all modules here that might define models so that
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment