-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Here is the code for sessiond.
It was in what you called wsgi.py, what I renamed app.py
First there is the import statement
from cromlech.browser import setSession
Then the code at the end of this post.
If it were just a decorator in the app.py file, I would just ignore it.
SInce the code was there I felt obliged to dig into it.
I am not sure where it should go? In cromlech.browser.session?
Or maybe in the JWT file. But certainly not in the app file. If it should
be in cromlech.browser, can you move it? If it should be in the JWT code, I can move it.
The method is listed below.
def sessionned(app):
@wraps(app)
def with_session(environ, start_response):
try:
setSession(environ['session'])
response = app(environ, start_response)
finally:
setSession()
return response
return with_session