Skip to content
Myr

Document ways to generate secret keys. This fixes #47.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 58285b6 · Browse files · 1 file+13 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+13 added−0 removed

  • other:+13 added−0 removed

1 file+13 added−0 removed

modified:docs/quickstart.rst+13 added
657 unmodified lines
658659The here mentioned :func:`~flask.escape` does escaping for you if you are660not using the template engine (like in this example).661662.. admonition:: How to generate good Secret Keys663664 The problem with random is that it's hard to judge what random is. And665 a secret key should be as random as possible. Your operating system666 has ways to generate pretty random stuff based on a cryptographical667 random generator which can be used to get such a key:668669 >>> import os670 >>> os.urandom(24)671 '\xfd{H\xe5<\x95\xf9\xe3\x96.5\xd1\x01O<!\xd5\xa2\xa0\x9fR"\xa1\xa8'672673 Just take that thing and copy/paste it into your code and you're done.674675Message Flashing676----------------677678Good applications and user interfaces are all about feedback. If the user
37 unmodified lines