diff options
author | zsloan | 2020-03-09 15:20:35 -0500 |
---|---|---|
committer | zsloan | 2020-03-09 15:20:35 -0500 |
commit | 698ecc501a5ae6e4771f3ce208864ef22080a81b (patch) | |
tree | feb12ef405fba15e3def09997d2402ff0f996da0 /wqflask | |
parent | c462a41d50f748741220adf5b125d26849c9fd4f (diff) | |
download | genenetwork2-698ecc501a5ae6e4771f3ce208864ef22080a81b.tar.gz |
Change that might fix issue on production
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/views.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index 8a80c26c..42b20880 100644 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -85,6 +85,10 @@ def connect_db(): g.db = g._database = sqlalchemy.create_engine(SQL_URI, encoding="latin1") logger.debug(g.db) +@app.before_request +def before_request(): + g.user_session = user_session.UserSession() + @app.teardown_appcontext def shutdown_session(exception=None): db = getattr(g, '_database', None) |