File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010from ...const import CONFIG , PROJECT_DIR
1111import os
1212from django .utils .translation import gettext_lazy as _
13+ from django .core .management .utils import get_random_secret_key
1314
1415# Build paths inside the project like this: BASE_DIR / 'subdir'.
1516BASE_DIR = Path (__file__ ).resolve ().parent .parent .parent
1819# See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/
1920
2021# SECURITY WARNING: keep the secret key used in production secret!
21- SECRET_KEY = CONFIG .get ('SECRET_KEY' )
22- if not SECRET_KEY :
23- raise RuntimeError (
24- "MAXKB_SECRET_KEY not configured, please provide it in the environment variable or configuration" )
22+ SECRET_KEY = CONFIG .get ('SECRET_KEY' ) or get_random_secret_key ()
2523# SECURITY WARNING: don't run with debug turned on in production!
2624DEBUG = CONFIG .get_debug ()
2725
You can’t perform that action at this time.
0 commit comments