Skip to content

Commit 26df875

Browse files
committed
update settings.py
1 parent 19fbff2 commit 26df875

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

gettingstarted/settings.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# Quick-start development settings - unsuitable for production
2121
# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
2222

23-
# SECURITY WARNING: keep the secret key used in production secret!
23+
# SECURITY WARNING: change this before deploying to production!
2424
SECRET_KEY = 'i+acxn5(akgsn!sr4^qgf(^m&*@+g1@u^t@=8s@axc41ml*f=s'
2525

2626
# SECURITY WARNING: don't run with debug turned on in production!
@@ -73,7 +73,7 @@
7373

7474

7575
# Database
76-
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
76+
# https://docs.djangoproject.com/en/1.9/ref/settings/#databases
7777

7878
DATABASES = {
7979
'default': {
@@ -92,11 +92,9 @@
9292
USE_TZ = True
9393

9494

95-
# Parse database configuration from $DATABASE_URL
96-
DATABASES['default'] = dj_database_url.config()
97-
98-
# Enable Persistent Connections
99-
DATABASES['default']['CONN_MAX_AGE'] = 500
95+
# Update database configuration with $DATABASE_URL.
96+
db_from_env = dj_database_url.config(conn_max_age=500)
97+
DATABASES['default'].update(db_from_env)
10098

10199
# Honor the 'X-Forwarded-Proto' header for request.is_secure()
102100
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')

0 commit comments

Comments
 (0)