From c300c194092c3d0c0c045e376f23ef73325c9773 Mon Sep 17 00:00:00 2001 From: CrabCatcher0 Date: Sat, 10 Aug 2024 00:18:09 +0545 Subject: [PATCH] SECRETE_KEY automatically generated. --- hello_world/settings.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hello_world/settings.py b/hello_world/settings.py index ca3c80a..9116796 100644 --- a/hello_world/settings.py +++ b/hello_world/settings.py @@ -22,7 +22,8 @@ # See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = config("SECRET_KEY", default='') +from django.core.management.utils import get_random_secret_key +SECRET_KEY = get_random_secret_key() # SECURITY WARNING: don't run with debug turned on in production! DEBUG = config("DEBUG", default=True)