"""
Django settings for web project.

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

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

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

import logging
import environ

# LOGGING CONFIG

logging.disable(logging.CRITICAL)

env = environ.Env()
root = environ.Path(__file__) - 3

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
LOGGING_CONFIG = None
BASE_DIR = root()

ENVIRONMENT = None


# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = env.str('SECRET_KEY', default='123')

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = env.bool('DEBUG', default=False)

ALLOWED_HOSTS = []

# Application definition

# ORDERING_PARAM = 'order_by'

INSTALLED_APPS = [
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.staticfiles',

    'exporter',
    'tests.fixtures.fake_app.apps.FakeApptestConfig'
]

# Database
# https://docs.djangoproject.com/en/1.11/ref/settings/#databases
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': 'db',
    }
}

# Celery
CELERY_TASK_ALWAYS_EAGER = False
CELERY_BROKER_URL = env.str('CELERY_BROKER_URL', default='redis://redis:6379/0')
CELERY_RESULT_BACKEND = env.str('CELERY_RESULT_BACKEND', default='redis://redis:6379/1')
