"""
Django settings for nhs_reminder project.

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

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

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

from third_party import *

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os

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.8/howto/deployment/checklist/

DEBUG = False

ALLOWED_HOSTS = []

LOGIN_URL = "/accounts/login"

INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',

    'allauth',
    'allauth.account',
    'bootstrap3',
    'djcelery',
    'flat',
    'rest_framework',

    'takeyourmeds.reminder',
    'takeyourmeds.telephony',
)

MIDDLEWARE_CLASSES = (
    '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',
    'django.middleware.security.SecurityMiddleware',
)

ROOT_URLCONF = 'takeyourmeds.urls'

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [
            os.path.join(BASE_DIR, 'templates'),
        ],
        '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 = 'nhs_reminder.wsgi.application'


TEMPLATE_CONTEXT_PROCESSORS = (
    'django.core.context_processors.request',
    'allauth.account.context_processors.account',
    'allauth.socialaccount.context_processors.socialaccount',
)

AUTHENTICATION_BACKENDS = (
    'django.contrib.auth.backends.ModelBackend',
    'allauth.account.auth_backends.AuthenticationBackend',
)

LOGIN_REDIRECT_URL = "/"

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': os.path.join(BASE_DIR, 'db.sqlite'),
    }
}

USE_TZ = False
TIME_ZONE = 'UTC'
USE_I18N = False
USE_L10N = False
LANGUAGE_CODE = 'en-gb'

STATIC_URL = '/static/'

import djcelery
djcelery.setup_loader()
BROKER_URL = 'redis://localhost:6379/0'

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'

SECRET_KEY = 'secret'

SITE_URL = 'http://takeyourmeds.fixme'

@@ -1,633 +1,112 @@
-%22%22%22%0ADjango settings for nhs_reminder project.%0A%0AGenerated by 'django-admin startproject' using Django 1.8.1.%0A%0AFor more information on this file, see%0Ahttps://docs.djangoproject.com/en/1.8/topics/settings/%0A%0AFor the full list of settings and their values, see%0Ahttps://docs.djangoproject.com/en/1.8/ref/settings/%0A%22%22%22%0A%0Afrom third_party import *%0A%0A# Build paths inside the project like this: os.path.join(BASE_DIR, ...)%0Aimport os%0A%0ABASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))%0A%0A# Quick-start development settings - unsuitable for production%0A# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
+import os%0A%0Afrom third_party import *%0A%0ABASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
 %0A%0ADE
@@ -117,17 +117,16 @@
 = False%0A
-%0A
 ALLOWED_
@@ -141,37 +141,188 @@
 %5B%5D%0A%0A
-LOGIN_URL = %22/accounts/login%22
+SECRET_KEY = 'overriden-in-production'%0A%0ADATABASES = %7B%0A    'default': %7B%0A        'ENGINE': 'django.db.backends.sqlite3',%0A        'NAME': os.path.join(BASE_DIR, 'db.sqlite'),%0A    %7D,%0A%7D
 %0A%0AIN
@@ -1220,16 +1220,67 @@
 ds.urls'
+%0AWSGI_APPLICATION = 'takeyourmeds.wsgi.application'
 %0A%0ATEMPLA
@@ -1820,61 +1820,8 @@
 %0A%5D%0A%0A
-WSGI_APPLICATION = 'nhs_reminder.wsgi.application'%0A%0A%0A
 TEMP
@@ -2152,173 +2152,83 @@
 %0A)%0A%0A
-LOGIN_REDIRECT_URL = %22/%22%0A%0ADATABASES = %7B%0A    'default': %7B%0A        'ENGINE': 'django.db.backends.sqlite3',%0A        'NAME': os.path.join(BASE_DIR, 'db.sqlite'),%0A    %7D%0A%7D
+WSGI_APPLICATION = 'takeyourmeds.wsgi.application'%0ALOGIN_REDIRECT_URL = '/'
 %0A%0AUS
@@ -2490,31 +2490,8 @@
 d'%0A%0A
-SECRET_KEY = 'secret'%0A%0A
 SITE

Tidy default settings file