"""
Django settings for superheroes project.

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

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

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

from __future__ import absolute_import
from unipath import Path


# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = Path(__file__).ancestor(3)


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'w_v(x2&kii_9o&3k!m5!sor_-f@*z%ur6i-6o^)0ae2d)n1k-6'

# 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',
    'rest_framework',
    'django_filters',
    'corsheaders',
    'modulos.ApiSuper',
]

MIDDLEWARE = [
    'django.middleware.security.SecurityMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'corsheaders.middleware.CorsMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

ROOT_URLCONF = 'superheroes.urls'

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [
			BASE_DIR.child('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 = 'superheroes.wsgi.application'


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

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'superheroes',
        'USER' : 'postgres',
        'PASSWORD' : 'sistemas123',
        'HOST' : 'localhost',
        'PORT' : '5432',
    }
}


# Password validation
# https://docs.djangoproject.com/en/1.10/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.10/topics/i18n/

LANGUAGE_CODE = 'es-BO'

TIME_ZONE = 'America/La_Paz'

USE_I18N = True

USE_L10N = True

USE_TZ = False


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

STATIC_URL = '/static/'

STATIC_DIRS = [BASE_DIR.child('media')]

REST_FRAMEWORK = {
    'PAGE_SIZE': 800,
    #'DEFAULT_FILTER_BACKENDS':{'django_filters.rest_framework.DjangoFilterBackend',},
    'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination',
    'UNICODE_JSON': False,
    'DATE_FORMAT': '%Y-%m-%d',
    'DATETIME_FORMAT': '%Y-%m-%dT%H:%M:%S',
}

# CONFIGURAR CORS PARA TODOS EN EL SERVIDOR
CORS_ORIGIN_ALLOW_ALL = True
CSRF_COOKIE_SECURE = True
# CONFIGURAR CORS PARA SOLO PARA ALGUNOS DE LA LISTA EN EL SERVIDOR 
# CORS_ORIGIN_ALLOW_ALL = False

#CORS_ORIGIN_WHITELIST = (
#    'http://127.0.0.1:8080'
#)
EMAIL_HOST = 'mail.oopp.gob.bo'
EMAIL_HOST_USER = 'cursos@oopp.gob.bo'
EMAIL_HOST_PASSWORD = 'ZdXn9m58Y3dY33Nr6'
EMAIL_PORT = 587
EMAIL_USE_TLS = True

bfa69de98b869ec5b815b305115ac6cd67137f05
<mask token>

<mask token>
BASE_DIR = Path(__file__).ancestor(3)
SECRET_KEY = 'w_v(x2&kii_9o&3k!m5!sor_-f@*z%ur6i-6o^)0ae2d)n1k-6'
DEBUG = True
ALLOWED_HOSTS = ['*']
INSTALLED_APPS = ['django.contrib.admin', 'django.contrib.auth',
    'django.contrib.contenttypes', 'django.contrib.sessions',
    'django.contrib.messages', 'django.contrib.staticfiles',
    'rest_framework', 'django_filters', 'corsheaders', 'modulos.ApiSuper']
MIDDLEWARE = ['django.middleware.security.SecurityMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'corsheaders.middleware.CorsMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware']
ROOT_URLCONF = 'superheroes.urls'
TEMPLATES = [{'BACKEND': 'django.template.backends.django.DjangoTemplates',
    'DIRS': [BASE_DIR.child('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 = 'superheroes.wsgi.application'
DATABASES = {'default': {'ENGINE': 'django.db.backends.postgresql_psycopg2',
    'NAME': 'superheroes', 'USER': 'postgres', 'PASSWORD': 'sistemas123',
    'HOST': 'localhost', 'PORT': '5432'}}
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'}
    ]
LANGUAGE_CODE = 'es-BO'
TIME_ZONE = 'America/La_Paz'
USE_I18N = True
USE_L10N = True
USE_TZ = False
STATIC_URL = '/static/'
STATIC_DIRS = [BASE_DIR.child('media')]
REST_FRAMEWORK = {'PAGE_SIZE': 800, 'DEFAULT_PAGINATION_CLASS':
    'rest_framework.pagination.LimitOffsetPagination', 'UNICODE_JSON': 
    False, 'DATE_FORMAT': '%Y-%m-%d', 'DATETIME_FORMAT': '%Y-%m-%dT%H:%M:%S'}
CORS_ORIGIN_ALLOW_ALL = True
CSRF_COOKIE_SECURE = True
EMAIL_HOST = 'mail.oopp.gob.bo'
EMAIL_HOST_USER = 'cursos@oopp.gob.bo'
EMAIL_HOST_PASSWORD = 'ZdXn9m58Y3dY33Nr6'
EMAIL_PORT = 587
EMAIL_USE_TLS = True

<mask token>
from __future__ import absolute_import
from unipath import Path
BASE_DIR = Path(__file__).ancestor(3)
SECRET_KEY = 'w_v(x2&kii_9o&3k!m5!sor_-f@*z%ur6i-6o^)0ae2d)n1k-6'
DEBUG = True
ALLOWED_HOSTS = ['*']
INSTALLED_APPS = ['django.contrib.admin', 'django.contrib.auth',
    'django.contrib.contenttypes', 'django.contrib.sessions',
    'django.contrib.messages', 'django.contrib.staticfiles',
    'rest_framework', 'django_filters', 'corsheaders', 'modulos.ApiSuper']
MIDDLEWARE = ['django.middleware.security.SecurityMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'corsheaders.middleware.CorsMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware']
ROOT_URLCONF = 'superheroes.urls'
TEMPLATES = [{'BACKEND': 'django.template.backends.django.DjangoTemplates',
    'DIRS': [BASE_DIR.child('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 = 'superheroes.wsgi.application'
DATABASES = {'default': {'ENGINE': 'django.db.backends.postgresql_psycopg2',
    'NAME': 'superheroes', 'USER': 'postgres', 'PASSWORD': 'sistemas123',
    'HOST': 'localhost', 'PORT': '5432'}}
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'}
    ]
LANGUAGE_CODE = 'es-BO'
TIME_ZONE = 'America/La_Paz'
USE_I18N = True
USE_L10N = True
USE_TZ = False
STATIC_URL = '/static/'
STATIC_DIRS = [BASE_DIR.child('media')]
REST_FRAMEWORK = {'PAGE_SIZE': 800, 'DEFAULT_PAGINATION_CLASS':
    'rest_framework.pagination.LimitOffsetPagination', 'UNICODE_JSON': 
    False, 'DATE_FORMAT': '%Y-%m-%d', 'DATETIME_FORMAT': '%Y-%m-%dT%H:%M:%S'}
CORS_ORIGIN_ALLOW_ALL = True
CSRF_COOKIE_SECURE = True
EMAIL_HOST = 'mail.oopp.gob.bo'
EMAIL_HOST_USER = 'cursos@oopp.gob.bo'
EMAIL_HOST_PASSWORD = 'ZdXn9m58Y3dY33Nr6'
EMAIL_PORT = 587
EMAIL_USE_TLS = True

"""
Django settings for superheroes project.

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

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

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

from __future__ import absolute_import
from unipath import Path


# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = Path(__file__).ancestor(3)


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'w_v(x2&kii_9o&3k!m5!sor_-f@*z%ur6i-6o^)0ae2d)n1k-6'

# 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',
    'rest_framework',
    'django_filters',
    'corsheaders',
    'modulos.ApiSuper',
]

MIDDLEWARE = [
    'django.middleware.security.SecurityMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'corsheaders.middleware.CorsMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

ROOT_URLCONF = 'superheroes.urls'

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [
			BASE_DIR.child('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 = 'superheroes.wsgi.application'


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

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'superheroes',
        'USER' : 'postgres',
        'PASSWORD' : 'sistemas123',
        'HOST' : 'localhost',
        'PORT' : '5432',
    }
}


# Password validation
# https://docs.djangoproject.com/en/1.10/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.10/topics/i18n/

LANGUAGE_CODE = 'es-BO'

TIME_ZONE = 'America/La_Paz'

USE_I18N = True

USE_L10N = True

USE_TZ = False


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

STATIC_URL = '/static/'

STATIC_DIRS = [BASE_DIR.child('media')]

REST_FRAMEWORK = {
    'PAGE_SIZE': 800,
    #'DEFAULT_FILTER_BACKENDS':{'django_filters.rest_framework.DjangoFilterBackend',},
    'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination',
    'UNICODE_JSON': False,
    'DATE_FORMAT': '%Y-%m-%d',
    'DATETIME_FORMAT': '%Y-%m-%dT%H:%M:%S',
}

# CONFIGURAR CORS PARA TODOS EN EL SERVIDOR
CORS_ORIGIN_ALLOW_ALL = True
CSRF_COOKIE_SECURE = True
# CONFIGURAR CORS PARA SOLO PARA ALGUNOS DE LA LISTA EN EL SERVIDOR 
# CORS_ORIGIN_ALLOW_ALL = False

#CORS_ORIGIN_WHITELIST = (
#    'http://127.0.0.1:8080'
#)
EMAIL_HOST = 'mail.oopp.gob.bo'
EMAIL_HOST_USER = 'cursos@oopp.gob.bo'
EMAIL_HOST_PASSWORD = 'ZdXn9m58Y3dY33Nr6'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
