From 8954bd4cac0dfe2b3aae28458b01ddf3a34ea6ef Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Tue, 2 Sep 2025 20:53:38 +0100 Subject: [PATCH] Improve instructions to generate secret key use a more secure option using the secrets module --- docs/3-deployment/deployment-on-pythonanywhere.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/3-deployment/deployment-on-pythonanywhere.rst b/docs/3-deployment/deployment-on-pythonanywhere.rst index 592b8be1a..3518f3e5e 100644 --- a/docs/3-deployment/deployment-on-pythonanywhere.rst +++ b/docs/3-deployment/deployment-on-pythonanywhere.rst @@ -44,7 +44,7 @@ Generate a secret key for yourself, eg like this: .. code-block:: bash - python -c 'import random;import string; print("".join(random.SystemRandom().choice(string.digits + string.ascii_letters + string.punctuation) for _ in range(50)))' + python -c 'import secrets;import string; print("".join(secrets.choice(string.digits + string.ascii_letters + string.punctuation) for _ in range(50)))' Make a note of it, since we'll need it here in the console and later on in the web app config tab.