"""
Django settings for Carpool project.

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

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 = 'g#h1-q%*6w-a(9(m5sq2pbac$08_ms%)e%izk*wdy(r&%y@*3w'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False

ALLOWED_HOSTS = ['*']

# Application definition

INSTALLED_APPS = [
  # 'djamin',
  'django.contrib.admin',
  'django.contrib.admindocs',
  'django.contrib.auth',
  'notifications',
  'django.contrib.contenttypes',
  'django.contrib.sessions',
  'django.contrib.messages',
  'django.contrib.staticfiles',
  'app.apps.AppConfig',
  'django.contrib.humanize',
  'actstream',
  'broadcast',
  'el_pagination',
  'rest_framework',
  'widget_tweaks',
  'smuggler',
  'corsheaders',
  'rest_framework.authtoken',

]

MIDDLEWARE_CLASSES = [
  'corsheaders.middleware.CorsMiddleware',
  'django.middleware.common.CommonMiddleware',
  'django.middleware.security.SecurityMiddleware',
  'whitenoise.middleware.WhiteNoiseMiddleware',
  'django.contrib.sessions.middleware.SessionMiddleware',
  '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 = 'Carpool.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 = 'Carpool.wsgi.application'
CORS_ORIGIN_ALLOW_ALL = True
CORS_ALLOW_METHODS = (
  'GET',
  'POST',
  'PUT',
  'PATCH',
  'DELETE',
  'OPTIONS'
)

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

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

    # 'NAME': 'my_ride',
    # 'USER': 'root',
    # 'PASSWORD': '',
    # 'HOST': '',
    # 'PORT': '3306',

  }
}

AUTH_USER_MODEL = 'app.CustomUser'
# Password validation
# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators





AUTH_PASSWORD_VALIDATORS = [
  {
    'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
  },
  {
    'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
  },
  {
    'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
  },
  {
    'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
  },
]

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

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'Africa/Lagos'

USE_I18N = True

USE_L10N = True

USE_TZ = False


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

# https://docs.djangoproject.com/en/1.10/howto/static-files/

# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.10/howto/static-files/
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))

# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.9/howto/static-files/
STATIC_ROOT = os.path.join(PROJECT_ROOT, 'staticfiles')
TEMPLATES_DIR = os.path.join(PROJECT_ROOT, 'staticfiles')
STATIC_URL = '/static/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL = '/media/'


# replace with gmail app config

ACCOUNT_ACTIVATION_DAYS = 7
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_USE_TLS = 1
EMAIL_PORT = 587
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''

@@ -4159,66 +4159,8 @@
 s')%0A
-TEMPLATES_DIR = os.path.join(PROJECT_ROOT, 'staticfiles')%0A
 STAT
@@ -4248,16 +4248,359 @@
 dia/'%0A%0A%0A
+# Static files (CSS, JavaScript, Images)%0A# https://docs.djangoproject.com/en/1.10/howto/static-files/%0APROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))%0A%0A# Static files (CSS, JavaScript, Images)%0A# https://docs.djangoproject.com/en/1.9/howto/static-files/%0ASTATIC_ROOT = os.path.join(PROJECT_ROOT, 'staticfiles')%0ASTATIC_URL = '/static/'%0A%0A
 # replac

changed DEBUG to False