Set the production SECRET_KEY from the environment

This commit is contained in:
Danielle McLean 2017-10-23 17:45:32 +11:00
parent c506a0bad9
commit 2c42a69f19
Signed by: 00dani
GPG key ID: 5A5D2D1AFF12EEC5

View file

@ -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/'