如何在 Bottle 微框架中使用 beaker session?
当我尝试使用烧杯将某些内容分配给会话字典时,出现以下错误:
Traceback (most recent call last):
rv = callback(*a, **ka)
File "controllers.py", line 30, in login
s['email'] = email
TypeError: 'NoneType' object does not support item assignment
1.0.0.127.in-addr.arpa - - [12/Feb/2012 18:48:52] "POST /login HTTP/1.1" 500 746
我按照
s = bottle.request.environ.get('beaker.session')
When I try to assign something to the session dictionary using beaker, I get the following error:
Traceback (most recent call last):
rv = callback(*a, **ka)
File "controllers.py", line 30, in login
s['email'] = email
TypeError: 'NoneType' object does not support item assignment
1.0.0.127.in-addr.arpa - - [12/Feb/2012 18:48:52] "POST /login HTTP/1.1" 500 746
where
s = bottle.request.environ.get('beaker.session')
I follow the tutorial at the bottle FAQ.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)