Commit 57ab4ea9 by Kenneth Reitz

updates

parent 82863fd2
...@@ -3,10 +3,10 @@ Django settings for {{ project_name }} project on Heroku. Fore more info, see: ...@@ -3,10 +3,10 @@ Django settings for {{ project_name }} project on Heroku. Fore more info, see:
https://github.com/heroku/heroku-django-template https://github.com/heroku/heroku-django-template
For more information on this file, see For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/ https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/ https://docs.djangoproject.com/en/1.9/ref/settings/
""" """
import os import os
...@@ -17,7 +17,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) ...@@ -17,7 +17,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production # Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/ # See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret! # SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = "{{ secret_key }}" SECRET_KEY = "{{ secret_key }}"
...@@ -70,7 +70,7 @@ WSGI_APPLICATION = '{{ project_name}}.wsgi.application' ...@@ -70,7 +70,7 @@ WSGI_APPLICATION = '{{ project_name}}.wsgi.application'
# Database # Database
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases # https://docs.djangoproject.com/en/1.9/ref/settings/#databases
DATABASES = { DATABASES = {
'default': { 'default': {
...@@ -80,7 +80,7 @@ DATABASES = { ...@@ -80,7 +80,7 @@ DATABASES = {
} }
# Internationalization # Internationalization
# https://docs.djangoproject.com/en/1.8/topics/i18n/ # https://docs.djangoproject.com/en/1.9/topics/i18n/
LANGUAGE_CODE = 'en-us' LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC' TIME_ZONE = 'UTC'
...@@ -88,12 +88,9 @@ USE_I18N = True ...@@ -88,12 +88,9 @@ USE_I18N = True
USE_L10N = True USE_L10N = True
USE_TZ = True USE_TZ = True
# Update database configuration with $DATABASE_URL.
# Parse database configuration from $DATABASE_URL db_from_env = dj_database_url.config(conn_max_age=500)
DATABASES['default'] = dj_database_url.config() DATABASES['default'].update(db_from_env)
# Enable Persistent Connections
DATABASES['default']['CONN_MAX_AGE'] = 500
# Honor the 'X-Forwarded-Proto' header for request.is_secure() # Honor the 'X-Forwarded-Proto' header for request.is_secure()
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
...@@ -102,7 +99,7 @@ SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') ...@@ -102,7 +99,7 @@ SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
ALLOWED_HOSTS = ['*'] ALLOWED_HOSTS = ['*']
# Static files (CSS, JavaScript, Images) # Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.7/howto/static-files/ # https://docs.djangoproject.com/en/1.9/howto/static-files/
BASE_DIR = os.path.dirname(os.path.abspath(__file__)) BASE_DIR = os.path.dirname(os.path.abspath(__file__))
STATIC_ROOT = 'staticfiles' STATIC_ROOT = 'staticfiles'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment