How to use beaker session in bottle micro framework?

前端 未结 1 1318
礼貌的吻别
礼貌的吻别 2021-01-14 01:05

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, **         


        
相关标签:
1条回答
  • 2021-01-14 01:32
    session_opts = {
        'session.type': 'file',
        'session.cookie_expires': 300,
        'session.data_dir': './data',
        'session.auto': True
    }
    myapp = SessionMiddleware(app, session_opts)
    run(app=myapp)
    
    0 讨论(0)
提交回复
热议问题