"""
Django settings for chowist project.

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

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

For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/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/2.0/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'u!srfxl%l#do9((pmstpl!z@=0533wln4j7t*u!x(wx@h6%$-0'

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

ALLOWED_HOSTS = []


# Application definition

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

MIDDLEWARE = [
    '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',
]

ROOT_URLCONF = 'chowist.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',
            ],
        },
    },
]

TEMPLATE_CONTEXT_PROCESSORS = [
    'django.core.context_processors.request',
]

WSGI_APPLICATION = 'chowist.wsgi.application'


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

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


# Password validation
# https://docs.djangoproject.com/en/2.0/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/2.0/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/2.0/howto/static-files/

STATIC_URL = '/static/'
STATICFILES_DIRS = [
    os.path.join(BASE_DIR, 'staticfiles'),
]
STATIC_ROOT = os.path.join(BASE_DIR, 'static')


# Authentication
# https://docs.djangoproject.com/en/2.0/topics/auth/default/

LOGIN_URL = 'login'
LOGIN_REDIRECT_URL = 'portal:home'
LOGOUT_REDIRECT_URL = 'portal:home'

@@ -3458,28 +3458,1307 @@
 EDIRECT_URL = 'portal:home'%0A
+%0A%0A# Logging%0A# https://docs.djangoproject.com/en/2.0/topics/logging/%0A%0ALOGGING = %7B%0A    'version': 1,%0A    'disable_existing_loggers': False,%0A    'formatters': %7B%0A        'verbose': %7B%0A            'format': '%25(levelname)s %25(asctime)s %25(module)s %25(process)d %25(thread)d %25(message)s'%0A        %7D,%0A        'simple': %7B%0A            'format': '%25(levelname)s %25(message)s'%0A        %7D,%0A    %7D,%0A    'filters': %7B%0A        'require_debug_true': %7B%0A            '()': 'django.utils.log.RequireDebugTrue',%0A        %7D,%0A        'require_debug_false': %7B%0A            '()': 'django.utils.log.RequireDebugFalse',%0A        %7D,%0A    %7D,%0A    'handlers': %7B%0A        'console': %7B%0A            'level': 'INFO',%0A            'filters': %5B'require_debug_true'%5D,%0A            'class': 'logging.StreamHandler',%0A            'formatter': 'simple',%0A        %7D,%0A        'mail_admins': %7B%0A            'level': 'ERROR',%0A            'filters': %5B'require_debug_false'%5D,%0A            'class': 'django.utils.log.AdminEmailHandler',%0A        %7D,%0A    %7D,%0A    'loggers': %7B%0A        'django': %7B%0A            'handlers': %5B'console'%5D,%0A            'level': os.getenv('DJANGO_LOG_LEVEL', 'INFO'),%0A        %7D,%0A        'django.request': %7B%0A            'handlers': %5B'mail_admins'%5D,%0A            'level': 'ERROR',%0A            'propagate': False,%0A        %7D,%0A    %7D,%0A%7D%0A

Add logging configuration