secret key not set in flask session, using the Flask-Session extension

前端 未结 3 985
南方客
南方客 2020-12-04 17:26

Right now I am using a flask 3rd party library Flask-Session and I am having no luck getting a session working.

When I connect to my site, I get the following error:

3条回答
  •  萌比男神i
    2020-12-04 17:47

    Try this:

    app = Flask(__name__)
    app.config['SESSION_TYPE'] = 'memcached'
    app.config['SECRET_KEY'] = 'super secret key'
    sess = Session()
    

    And remove your app.secret_key assignment at the bottom.

提交回复
热议问题