"""
Django settings for django_template project.

Generated by 'django-admin startproject' using Django 1.9.2.

For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""

import os

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = os.environ['SECRET_KEY']

# SECURITY WARNING: don't run with debug turned on in production!
try:
    DEBUG = os.environ['DEBUG'] == 'True'
except KeyError:
    DEBUG = False

if DEBUG:
    ALLOWED_HOSTS = ['*']
else:
    ALLOWED_HOSTS = ['127.0.0.1']

# Application definition

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django_extensions',
]

MIDDLEWARE_CLASSES = [
    'django.middleware.security.SecurityMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

ROOT_URLCONF = 'django_template.urls'

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                'django.template.context_processors.debug',
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                'django.contrib.messages.context_processors.messages',
            ],
        },
    },
]

WSGI_APPLICATION = 'django_template.wsgi.application'


# Database
# https://docs.djangoproject.com/en/1.9/ref/settings/#databases


DATABASES['default'] = dj_database_url.config(
    default=os.environ['DATABASE_URL'],
    conn_max_age=None)


# Password validation
# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators

if DEBUG:
    AUTH_PASSWORD_VALIDATORS = []
else:
    AUTH_PASSWORD_VALIDATORS = [{
        'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',  # noqa
        }, {
        'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',  # noqa
        }, {
        'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',  # noqa
        }, {
        'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',  # noqa
        },
    ]


# Internationalization
# https://docs.djangoproject.com/en/1.9/topics/i18n/

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_L10N = True

USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.9/howto/static-files/

STATIC_URL = '/static/'

@@ -319,16 +319,40 @@
 port os%0A
+import dj_database_url%0A%0A
 %0A# Build
@@ -2364,17 +2364,16 @@
 abases%0A%0A
-%0A
 DATABASE
@@ -2373,17 +2373,25 @@
 ATABASES
-%5B
+ = %7B%0A    
 'default
@@ -2391,19 +2391,17 @@
 default'
-%5D =
+:
  dj_data
@@ -2417,16 +2417,20 @@
 config(%0A
+    
     defa
@@ -2461,16 +2461,20 @@
 _URL'%5D,%0A
+    
     conn
@@ -2487,16 +2487,23 @@
 ge=None)
+,%0A    %7D
 %0A%0A%0A# Pas

Fix forgotten import dj-database-url