From a6313b8fb4cf14f566f55c710533636b7e29ed7b Mon Sep 17 00:00:00 2001 From: Sebastiaan Zeeff <33516116+SebastiaanZ@users.noreply.github.com> Date: Tue, 22 Oct 2019 19:29:31 +0200 Subject: Set SECRET_KEY to constant in debug mode The SECRET_KEY in debug mode was auto-generated each time the config file was loaded. This had the unwanted side-effect of requiring testers to login again on the site as the SECRET_KEY had changed during the reload process. This commit resolves that by turning it into a constant. Since having a constant secret results in the linting error `S105`, I have added a specific `noqa` ignore for that. --- pydis_site/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pydis_site/settings.py') diff --git a/pydis_site/settings.py b/pydis_site/settings.py index 56ac0a1d..94718ec7 100644 --- a/pydis_site/settings.py +++ b/pydis_site/settings.py @@ -48,7 +48,7 @@ if DEBUG: 'staff.web' ] ) - SECRET_KEY = secrets.token_urlsafe(32) + SECRET_KEY = "yellow polkadot bikini" # noqa: S105 elif 'CI' in os.environ: ALLOWED_HOSTS = ['*'] -- cgit v1.2.3