3
我试图让gae-sessions工作,但我遇到问题。gae-sessions'thread._local'对象没有任何属性'current_session'
我记录在appengine_config.py和webapp_add_wsgi_middleware里面,它被调用。
我已经在libs __init__.py
里面登录,它在SessionMiddleware里运行__init__
,__call__
和my_start_response
没有问题。
我的问题是,第二个我尝试实际利用会话:
session = get_current_session()
我得到这个:
session = get_current_session()
File "gaesessions\__init__.py", line 38, in get_current_session
return _tls.current_session
AttributeError: 'thread._local' object has no attribute 'current_session'
那么你的溶剂是什么? – 2014-03-03 10:10:48
你需要在你的WSGI中间件中添加gae-sessions安装代码https://github.com/dound/gae-sessions#installation – Sandeep 2014-12-02 18:52:35
你应该添加这个作为答案,我的答案只是为了避免造成这种情况错误。 :P – Joren 2014-12-03 19:10:42