Skip to content

Commit 11478b5

Browse files
authored
Merge pull request #11 from geoadmin/bug-pb-897-fix-secret-key
PB 897 fix secret key and WSGI settings loading
2 parents de649a0 + 6813e73 commit 11478b5

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

.env.default

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ DB_PORT=5432
55
DB_HOST=localhost
66
DB_NAME_TEST=postgres_test
77
DJANGO_SETTINGS_MODULE=config.settings_dev
8+
SECRET_KEY=django-insecure-6-72r#zx=sv6v@-4k@uf1gv32me@%yr*oqa*fu8&5l&a!ws)5#

app/config/settings_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/
2424

2525
# SECURITY WARNING: keep the secret key used in production secret!
26-
SECRET_KEY = 'django-insecure-6-72r#zx=sv6v@-4k@uf1gv32me@%yr*oqa*fu8&5l&a!ws)5#'
26+
SECRET_KEY = env('SECRET_KEY', default=None)
2727

2828
# SECURITY WARNING: don't run with debug turned on in production!
2929
DEBUG = False

app/config/wsgi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111

1212
from django.core.wsgi import get_wsgi_application
1313

14-
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'app.settings')
14+
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'app.config.settings_prod')
1515

1616
application = get_wsgi_application()

0 commit comments

Comments
 (0)