import environ
from p0sx.settings.base import *

env = environ.Env()
environ.Env.read_env()

ALLOWED_HOSTS = env.str('ALLOWED_HOSTS').split(',')

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

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

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

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
        'NAME': env.str('POSTGRES_DB'),                      # Or path to database file if using sqlite3.
        # The following settings are not used with sqlite3:
        'USER': env.str('POSTGRES_USER'),
        'PASSWORD': env.str('POSTGRES_PASSWORD'),
        'HOST': env.str('POSTGRES_HOST'),                      # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
        'PORT': '5432',                      # Set to empty string for default.
    }
}


SITE_URL = env.str('SITE_URL')

import environ
from p0sx.settings.base import *

env = environ.Env()
environ.Env.read_env()

ALLOWED_HOSTS = env.str('ALLOWED_HOSTS').split(',')

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

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

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

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
        'NAME': env.str('POSTGRES_DB'),                      # Or path to database file if using sqlite3.
        # The following settings are not used with sqlite3:
        'USER': env.str('POSTGRES_USER'),
        'PASSWORD': env.str('POSTGRES_PASSWORD'),
        'HOST': env.str('POSTGRES_HOST'),                      # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
        'PORT': '5432',                      # Set to empty string for default.
    }
}


SITE_URL = env.str('SITE_URL')

# SECURITY WARNING: keep the secret key used in production secret! # SECURITY WARNING: don't run with debug turned on in production! # Database # https://docs.djangoproject.com/en/1.8/ref/settings/#databases # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. # Or path to database file if using sqlite3. # The following settings are not used with sqlite3: # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP. # Set to empty string for default.