mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-02-03 05:04:25 +03:00
Make SECRET_KEY required in production and not in development
This commit is contained in:
parent
a83a1f5470
commit
581563fa35
|
@ -77,12 +77,6 @@ DEBUG = env.bool("DJANGO_DEBUG", False)
|
||||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#template-debug
|
# See: https://docs.djangoproject.com/en/dev/ref/settings/#template-debug
|
||||||
TEMPLATE_DEBUG = DEBUG
|
TEMPLATE_DEBUG = DEBUG
|
||||||
|
|
||||||
# SECRET CONFIGURATION
|
|
||||||
# ------------------------------------------------------------------------------
|
|
||||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
|
|
||||||
# Raises ImproperlyConfigured exception if DJANO_SECRET_KEY not in os.environ
|
|
||||||
SECRET_KEY = env("DJANGO_SECRET_KEY")
|
|
||||||
|
|
||||||
# FIXTURE CONFIGURATION
|
# FIXTURE CONFIGURATION
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-FIXTURE_DIRS
|
# See: https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-FIXTURE_DIRS
|
||||||
|
|
|
@ -14,6 +14,12 @@ from boto.s3.connection import OrdinaryCallingFormat
|
||||||
|
|
||||||
from .common import * # noqa
|
from .common import * # noqa
|
||||||
|
|
||||||
|
# SECRET CONFIGURATION
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# See: https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
|
||||||
|
# Raises ImproperlyConfigured exception if DJANO_SECRET_KEY not in os.environ
|
||||||
|
SECRET_KEY = env("DJANGO_SECRET_KEY")
|
||||||
|
|
||||||
# This ensures that Django will be able to detect a secure connection
|
# This ensures that Django will be able to detect a secure connection
|
||||||
# properly on Heroku.
|
# properly on Heroku.
|
||||||
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
|
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user