From e14a0432b26b5b50126b0be86ef747a6691b09c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Tue, 6 Dec 2022 08:14:39 +0800 Subject: [PATCH] Applied a random secret key to the settings of the test site, although it is not important. --- tests/test_site/test_site/settings.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_site/test_site/settings.py b/tests/test_site/test_site/settings.py index 1481fed..6bdf63d 100644 --- a/tests/test_site/test_site/settings.py +++ b/tests/test_site/test_site/settings.py @@ -11,6 +11,7 @@ https://docs.djangoproject.com/en/3.2/ref/settings/ """ import os from pathlib import Path +from secrets import token_urlsafe # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent @@ -20,7 +21,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent # See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = 'django-insecure-vc+(5e-2xn%bc29&k#ah_vf17-)usz4af4y)njbp_k09)uev$$' +SECRET_KEY = token_urlsafe(48) # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True