"""
Django settings for main project.

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

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

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

from pathlib import Path

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent

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

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'u%$@xe$woeak%d3_(o+2n6okux-ms9syho*f38vf2i!_$r3_)a'

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

ALLOWED_HOSTS = ['*']

# Application definition

INSTALLED_APPS = [
	'material.admin',
	'material.admin.default',
	# 'django.contrib.admin',
	'django.contrib.auth',
	'django.contrib.contenttypes',
	'django.contrib.sessions',
	'django.contrib.messages',
	'django.contrib.staticfiles',
	'corsheaders',
	'rest_framework',
	'colors',
	'social_media',
	'technology',
	'team',
	'clients',
	'wolfdiary',
	'contact',
]

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',
	'corsheaders.middleware.CorsMiddleware',
	'django.middleware.common.CommonMiddleware',
]

CORS_ORIGIN_ALLOW_ALL = True

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

WSGI_APPLICATION = 'main.wsgi.application'

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

DATABASES = {
	#'default': {
	#	'ENGINE': 'django.db.backends.sqlite3',
	#	'NAME': BASE_DIR / 'WolfCodedb.sqlite3',
	#}
    'default':{
        'ENGINE': 'django.db.backends.postgresql',
        'NAME': 'postgres',
        'USER': 'postgres',
        'PASSWORD': 'postgres',
        'HOST': 'db',
        'PORT': 5432,
    }
}

# Password validation
# https://docs.djangoproject.com/en/3.1/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',
	},
]

AUTH_USER_MODEL = 'team.TeamMember'

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

STATIC_URL = '/static/'
STATIC_ROOT = BASE_DIR / 'static'

MEDIA_URL = '/media/'
MEDIA_ROOT = BASE_DIR / 'media'
MEDIA_SERVER = 'http://192.168.1.109'

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_USE_TLS = True
EMAIL_PORT = 587
EMAIL_HOST_USER = 'wolvescodetesting@gmail.com'
EMAIL_HOST_PASSWORD = 'prueba123'

EMAIL_LIST = ['wolvescodetesting@gmail.com']

MATERIAL_ADMIN_SITE = {
	'HEADER': 'WolvesCode Admin',  # Admin site header
	'TITLE': 'WolvesCode Admin',  # Admin site title
	# 'FAVICON': 'path/to/favicon',  # Admin site favicon (path to static should be specified)
	'MAIN_BG_COLOR': 'black',  # Admin site main color, css color should be specified
	'MAIN_HOVER_COLOR': 'blue',  # Admin site main hover color, css color should be specified
	# 'PROFILE_PICTURE': 'path/to/image',  # Admin site profile picture (path to static should be specified)
	# 'PROFILE_BG': 'path/to/image',  # Admin site profile background (path to static should be specified)
	# 'LOGIN_LOGO': 'path/to/image',  # Admin site logo on login page (path to static should be specified)
	# 'LOGOUT_BG': 'path/to/image',  # Admin site background on login/logout pages (path to static should be specified)
	'SHOW_THEMES': True,  # Show default admin themes button
	# 'TRAY_REVERSE': True,  # Hide object-tools and additional-submit-line by default
	# 'NAVBAR_REVERSE': True,  # Hide side navbar by default
	'SHOW_COUNTS': True,  # Show instances counts for each model
	'APP_ICONS': {
		# Set icons for applications(lowercase), including 3rd party apps, {'application_name': 'material_icon_name',
		# ...}
		'sites': 'send',
		'team': 'face',
		'clients': 'person',
		'colors': 'brush',
		'contact': 'account_circle',
		'social_media': 'camera',
		'technology': 'computer',
		'wolfdiary': 'description'
	},
	# 'MODEL_ICONS': {
	#     # Set icons for models(lowercase), including 3rd party models, {'model_name': 'material_icon_name', ...}
	#     'site': 'contact_mail',
	#     'TeamMembers': 'face',
	# }
}
