From 2c42a69f1925744400528c13ef22d87ea1e7030a Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Mon, 23 Oct 2017 17:45:32 +1100 Subject: [PATCH] Set the production SECRET_KEY from the environment --- lemoncurry/settings/prod.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lemoncurry/settings/prod.py b/lemoncurry/settings/prod.py index 170cb92..18614fb 100644 --- a/lemoncurry/settings/prod.py +++ b/lemoncurry/settings/prod.py @@ -1,12 +1,18 @@ +from os import environ + from .base import * from .base import DATABASES ALLOWED_HOSTS = ['00dani.me'] +DEBUG = False +SECRET_KEY = environ['DJANGO_SECRET_KEY'] + +# Use Postgres instead of SQLite in production. DATABASES['default'] = { 'ENGINE': 'django.db.backends.postgresql', 'NAME': 'lemoncurry', 'USER': 'lemoncurry', } -DEBUG = False + STATIC_URL = 'https://cdn.00dani.me/' MEDIA_URL = STATIC_URL + 'media/'