"""
Django settings for egaclm 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 os

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = os.path.dirname(os.path.realpath(__file__))


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'n%v#kf52fngc3$wzkefe)+2s%9z0s#4v6_$iv$$r@mymr2ct(l'

# 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',
    'widget_tweaks',
    # 'sermepa',
    'app_matriculas',
    'app_test',
    # 'app_tpv',
    'app_archivos',
    'app_aulas',
    'app_elecciones',
]

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 = 'egaclm.urls'

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [
            os.path.join(BASE_DIR, "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',
		'django.template.context_processors.media',
            ],
        },
    },
]

WSGI_APPLICATION = 'egaclm.wsgi.application'

EMAIL_HOST = 'smtp.serviciodecorreo.es'
EMAIL_HOST_USER = 'comunicaciones@academiaega.com'
EMAIL_HOST_PASSWORD = '+Toledo2024'
EMAIL_PORT = 465
EMAIL_USE_SSL = True
DEFAULT_FROM_EMAIL ='info@academiaega.com'

# Database
# https://docs.djangoproject.com/en/1.11/ref/settings/#databases

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'NAME': 'egaclm',
        'USER': 'jcroldanm',
        'PASSWORD': 'Raferlaju13+',
    }
}


# Password validation
# https://docs.djangoproject.com/en/1.11/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.11/topics/i18n/

LANGUAGE_CODE = 'es-ES'

TIME_ZONE = 'Europe/Madrid'

USE_I18N = True

USE_L10N = True

USE_TZ = True


#  Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.2/howto/static-files/

STATIC_URL = '/static/'
MEDIA_URL = '/media/'

# STATIC_ROOT =  os.path.join(BASE_DIR, "static/")
MEDIA_ROOT = os.path.join(BASE_DIR, "media")

STATICFILES_DIRS = [
    os.path.join(BASE_DIR, "static"),
]

'''
# TEST
SERMEPA_URL_PRO = 'https://sis-t.redsys.es:25443/sis/realizarPago'
SERMEPA_URL_TEST = 'https://sis-t.redsys.es:25443/sis/realizarPago'
SERMEPA_SECRET_KEY = 'MkyfxJvYgCrV1eXuVKUdWSKbtAP650Tk'
SERMEPA_MERCHANT_CODE = '036722825' #Numero de comercio de test


# PRODUCCION
SERMEPA_URL_PRO = 'https://sis.redsys.es/sis/realizarPago'
SERMEPA_URL_TEST = 'https://sis.redsys.es/sis/realizarPago'
SERMEPA_SECRET_KEY = 'Xa/N0TCmc6QG2ckYvfVTvRWm1Lk/qHfl'
SERMEPA_MERCHANT_CODE = '036722825' #Numero de comercio


SERMEPA_TERMINAL = '001'
SERMEPA_BUTTON_IMG = '/media/img/logo-horizontal.png'
SERMEPA_CURRENCY = '978' #Euros
SERMEPA_BUTTON_TEXT = 'PAGAR AHORA'
SERMEPA_SIGNATURE_VERSION = "HMAC_SHA256_V1"
'''

#############################################
# PARAMETROS bigbluebutton
#############################################

SALT = "vBhVWtQltJM1U1n9O7vStMP13vl9r0iw7yFhqXa474"
BBB_API_URL = "https://aulas.academiaega.com/bigbluebutton/api/"

#############################################
# PARAMETROS stripe
#############################################

# from decouple import config

STRIPE_SECRET_KEY = 'sk_test_51Q0QIEK6iLfVXgKL3fLDzwWTAYpxfXacCsklqDMOUs4Fc4ntAm9yddarPl1Mt3q9t5upfbPQWaTXp5P6CPmhMJ1200skXGKZrW'
