Issue
I am trying to set up Flask-Debugtoolbar, but I get the message "DebugToolBar requires a SECRET_KEY". Where do I get the secret key?
Solution
The secret key is needed to keep the client-side sessions secure. You can generate some random key as below:
>>> import os
>>> os.urandom(24)
'\xfd{H\xe5<\x95\xf9\xe3\x96.5\xd1\x01O<!\xd5\xa2\xa0\x9fR"\xa1\xa8'
Just take that key and copy/paste it into your config file
SECRET_KEY = '\xfd{H\xe5<\x95\xf9\xe3\x96.5\xd1\x01O<!\xd5\xa2\xa0\x9fR"\xa1\xa8'
See Sessions documentation
Answered By - r-m-n
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.