#
# ----------------------------------------------------------------------------------------------------
# DESCRIPTION
# ----------------------------------------------------------------------------------------------------
'''
Django settings for kit_django project.

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

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

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

# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/
'''
## @package kit_django                          @brief [ PACKAGE   ] - Django project Python package.
## @dir     kit_django                          @brief [ DIRECTORY ] - Django project directory.
## @file    kit_django/asgi.py                  @brief [ FILE      ] - ASGI module file.
## @package kit_django.asgi                     @brief [ MODULE    ] - ASGI module.
## @file    kit_django/settings.py              @brief [ FILE      ] - Settings module file.
## @package kit_django.settings                 @brief [ MODULE    ] - Settings module.
## @file    kit_django/urls.py                  @brief [ FILE      ] - URL module file.
## @package kit_django.urls                     @brief [ MODULE    ] - URL module.
## @file    kit_django/wsgi.py                  @brief [ FILE      ] - WSGI module file.
## @package kit_django.wsgi                     @brief [ MODULE    ] - WSGI module.


#
# ----------------------------------------------------------------------------------------------------
# IMPORTS
# ----------------------------------------------------------------------------------------------------
import  os

from    projectSettings import common


#
# ----------------------------------------------------------------------------------------------------
# CODE
# ----------------------------------------------------------------------------------------------------
# SECURITY WARNING: keep the secret key used in production secret!
## [ str ] - Secret key.
SECRET_KEY                  = '<KEY>

# SECURITY WARNING: don't run with debug turned on in production!
## [ bool ] - Debug.
DEBUG                       = common.DEBUG

## [ list of str ] - Allowed hosts.
ALLOWED_HOSTS               = common.ALLOWED_HOSTS

## [ str ] - URL.
ROOT_URLCONF                = 'kit_django.urls'

## [ str ] - WSGI application.
WSGI_APPLICATION            = 'kit_django.wsgi.application'



#
# ----------------------------------------------------------------------------------------------------
# INSTALLED APPS
# ----------------------------------------------------------------------------------------------------
## [ list of str ] - Installed apps.
INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',

    'rest_framework',
    'rest_framework.authtoken',

    'commonStatic',
    'contact',
    'content',
    'context',
    'conversion',
    'core',
    'errorPage',
    'faq',
    'landingPage',
    'language',
    'newsletter',
    'privacyNotice',
    'projectSettings',
    'restAPICore',
    'simpleAPIAccount',
    'termsOfUse',
    'testimonial',
    'userAccount',
    'visitorCount',

]



#
# ----------------------------------------------------------------------------------------------------
# MIDDLEWARE
# ----------------------------------------------------------------------------------------------------
## [ list ] - Middleware.
MIDDLEWARE = [
    'core.middlewares.IsWebSiteEnabledMiddleware',

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

    'core.middlewares.LanguageMiddleware',
    'visitorCount.middlewares.VisitorCountMiddleware',
]



#
# ----------------------------------------------------------------------------------------------------
# TEMPLATES
# ----------------------------------------------------------------------------------------------------
## [ list ] - Templates.
TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': common.TEMPLATES_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',
            ],
        },
    },
]



#
# ----------------------------------------------------------------------------------------------------
# DATABASE
# ----------------------------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/3.0/ref/settings/#databases

## [ dict ] - Databases.
DATABASES                   = common.DATABASES



#
# ----------------------------------------------------------------------------------------------------
# USER
# ----------------------------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators

## [ list of dict ] - Password validators.
AUTH_PASSWORD_VALIDATORS    = common.AUTH_PASSWORD_VALIDATORS

## [ str ] - User model.
AUTH_USER_MODEL             = common.AUTH_USER_MODEL

## [ str ] - Login URL.
LOGIN_URL                   = common.LOGIN_URL



#
# ----------------------------------------------------------------------------------------------------
# INTERNATIONALIZATION
# ----------------------------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/3.0/topics/i18n/

## [ str ] - Language code.
LANGUAGE_CODE               = common.LANGUAGE_CODE

## [ str ] - Time zone.
TIME_ZONE                   = 'America/Vancouver'

## [ str ] - USE_I18N.
USE_I18N                    = True

## [ str ] - USE_L10N.
USE_L10N                    = True

## [ str ] - USE_TZ.
USE_TZ                      = True



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

## [ str ] - Static URL.
STATIC_URL                  = common.STATIC_URL

## [ list of str ] - Static file directories.
STATIC_ROOT                 = common.STATIC_ROOT

## [ str ] - Static root.
STATICFILES_DIRS            = common.STATICFILES_DIRS



#
# ----------------------------------------------------------------------------------------------------
# MEDIA
# ----------------------------------------------------------------------------------------------------
## [ str ] - Media URL.
MEDIA_URL                   = common.MEDIA_URL

## [ str ] - Media root.
MEDIA_ROOT                  = common.MEDIA_ROOT



#
# ----------------------------------------------------------------------------------------------------
# E-MAIL
# ----------------------------------------------------------------------------------------------------
## [ bool ] - Email use TLS.
EMAIL_USE_TLS               = common.EMAIL_USE_TLS

## [ int ] - Email port.
EMAIL_PORT                  = common.EMAIL_PORT

## [ str ] - Email host.
EMAIL_HOST                  = common.EMAIL_HOST

## [ str ] - Email host user.
EMAIL_HOST_USER             = common.EMAIL_HOST_USER

## [ str ] - Email from email.
DEFAULT_FROM_EMAIL          = common.DEFAULT_FROM_EMAIL

## [ str ] - Email server email.
SERVER_EMAIL                = common.SERVER_EMAIL

## [ str ] - Email host password.
EMAIL_HOST_PASSWORD         = common.EMAIL_HOST_PASSWORD



#
# ----------------------------------------------------------------------------------------------------
# REST FRAMEWORK
# ----------------------------------------------------------------------------------------------------
## [ dict ] - REST framework settings.
REST_FRAMEWORK              = common.REST_FRAMEWORK
















