"""
Django settings for LOGEEKSWEBAPP project.

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

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

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

import os
from easy_thumbnails.conf import settings as thumbnail_settings

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))


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

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'c1k@8%#qu&uq44himz@3&0&tq8)1*vrof1t*%eoj*d=*&6fc#!'

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

ALLOWED_HOSTS = []

# TODO: remember to fix the EMAIL_BACKEND before deployment/production
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
# EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'

# Application definition

INSTALLED_APPS = [
    'student.apps.StudentConfig',
    'tutor.apps.TutorConfig',
    'homepage.apps.HomepageConfig',
    'transaction.apps.TransactionConfig',
    'easy_thumbnails',
    'image_cropping',
    'captcha',
    'location_field.apps.DefaultConfig',
    'dlf_app',
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
]

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

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

THUMBNAIL_PROCESSORS = (
    'image_cropping.thumbnail_processors.crop_corners',
) + thumbnail_settings.THUMBNAIL_PROCESSORS

# IMAGE_CROPPING_THUMB_SIZE = (300, 300)
THUMBNAIL_DEBUG = True
# IMAGE_CROPPING_JQUERY_URL = 'js/jquery.min.js'
IMAGE_CROPPING_SIZE_WARNING = True


WSGI_APPLICATION = 'LOGEEKSWEBAPP.wsgi.application'


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

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
    }
}


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

LANGUAGE_CODE = 'en-us'

# TIME_ZONE = 'UTC +01:00'

USE_I18N = True

USE_L10N = True

USE_TZ = True


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

STATIC_URL = '/static/'
STATIC_ROOT = '/home/akintade/Documents/Akintade/development/LOGEEKSATUTORS/WEB/LOGEEKSWEBAPP/static_files_folder/'

MEDIA_URL = '/media/'
MEDIA_ROOT = '/home/akintade/Documents/Akintade/development/LOGEEKSATUTORS/WEB/LOGEEKSWEBAPP/media_files_folder/'


LOCATION_FIELD = {'map.provider': 'google', }
LOCATION_FIELD = {'search.provider': 'google', }
LOCATION_FIELD = {
        'provider.google.api': '//maps.google.com/maps/api/js?sensor=false',
        'provider.google.api_key': 'AIzaSyA3B2inkHRotAlyygmJ7MTneCAjHYQaggo',
        'provider.google.api_libraries': 'EmB0qQudEbj-W4H56FKBPbnKF34=',
        'provider.google.map.type': 'ROADMAP',
    }

# GEOS_LIBRARY_PATH = 'C:/Users/h/Documents/LOGEEKSATUTORS/WEB/LOGEEKSWEBAPP/spatialite-2.0-win-libs/spatialite-2.0-win-libs/libgoes_c.a'
# GEOS_LIBRARY_PATH = 'C:/Users/h/Documents/LOGEEKSATUTORS/WEB/LOGEEKSWEBAPP/spatialite-2.0-win-dlls/spatialite-2.0-win-dlls/libgeos_c-1.dll'
# GEOS_LIBRARY_PATH = 'C:/Users/h/AppData/Local/Programs/Python/Python35-32/Lib/site-packages/django/contrib/gis/'

# LOCATION_FIELD_PATH = settings.STATIC_URL + 'location_field'
#
# LOCATION_FIELD = {'resources.root_path': LOCATION_FIELD_PATH,
#         'resources.media': {
#             'js': (
#                 LOCATION_FIELD_PATH + '/js/jquery.livequery.js',
#                 LOCATION_FIELD_PATH + '/js/form.js',
#             ),
#         }
#    }
#
