"""
Django settings for gig project.

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

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

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

import os

from decouple import Config, RepositoryEnv

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

#Reference to the file gig_root/gig/settings/'.env'
env_config = Config(RepositoryEnv(os.path.join(BASE_DIR, '.env')))


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

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


ALLOWED_HOSTS = ['gig.pythonanywhere.com']


# Application definition

AUTH_USER_MODEL = "users.User"

EMAIL_USE_TLS = True
EMAIL_HOST = env_config.get('EMAIL_HOST')
EMAIL_HOST_USER = env_config.get('EMAIL_HOST_USER')
EMAIL_HOST_PASSWORD = env_config.get('EMAIL_HOST_PASSWORD')
EMAIL_PORT = env_config.get('EMAIL_PORT', cast=int)

INSTALLED_APPS = [
    'users.apps.UsersConfig',
    'artists.apps.ArtistsConfig',
    'musicians.apps.MusiciansConfig',
    'events.apps.EventsConfig',
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',

    #Third-party apps
    'social_django',
    'cloudinary',
    'rest_framework'

    #local apps

]

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',
    'social_django.middleware.SocialAuthExceptionMiddleware',
]

ROOT_URLCONF = 'gig.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',

                'social_django.context_processors.backends',
                'social_django.context_processors.login_redirect',
            ],
        },
    },
]



AUTHENTICATION_BACKENDS = (
    'social_core.backends.facebook.FacebookOAuth2',
    'social_core.backends.open_id.OpenIdAuth',
    'social_core.backends.google.GoogleOpenId',
    'social_core.backends.google.GoogleOAuth2',
    'django.contrib.auth.backends.ModelBackend',
)

#Facebook settings
SOCIAL_AUTH_FACEBOOK_API_VERSION = '2.10'
SOCIAL_AUTH_FACEBOOK_KEY = env_config.get('SOCIAL_AUTH_FACEBOOK_KEY')
SOCIAL_AUTH_FACEBOOK_SECRET = env_config.get('SOCIAL_AUTH_FACEBOOK_SECRET')
SOCIAL_AUTH_FACEBOOK_SCOPE = ['email']
SOCIAL_FACEBOOK_PROFILE_EXTRA_PARAMS = {
        'fields': 'id,name,email',
}
SOCIAL_AUTH_FACEBOOK_AUTH_EXTRA_ARGUMENTS = {
    'local': 'ru_RU',
    'fields': 'id, name, email, age_rang',
}


#Google settings
SOCIAL_AUTH_GOOGLE_OAUTH2_KEY =env_config.get('SOCIAL_AUTH_GOOGLE_OAUTH2_KEY')
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = env_config.get('SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET')


LOGIN_URL = 'users:login'
LOGOUT_URL = 'logout'
LOGIN_REDIRECT_URL = 'home'
LOGOUT_REDIRECT_URL = 'home'

#pipeline that represents the operations that are execute when information is retrieved
#from social medias.
SOCIAL_AUTH_PIPELINE = (

    'social_core.pipeline.social_auth.social_details',
    'social_core.pipeline.social_auth.social_uid',
    'social_core.pipeline.social_auth.auth_allowed',


    #The next function calls will retrieve a users.models.User if this one exits. To retrieve it a social_user profile is first retrieved and then asossciated
    #User is then retrieved
    'social_core.pipeline.social_auth.social_user',
    'social_core.pipeline.user.get_username',

    #In case we have no User instance in db. The email associated to the social login will be retrieved and a users.model.User will be created
    'users.social_auth.retrieve_email',
    'users.social_auth.retrieve_user',

    #Request for the user to chose a password and confirm credentials
    'users.social_auth.request_password',
    #Create a User account if the user signs in for the first time
    'users.social_auth.create_user',

    #If no social_user model exists associated to the created or retrieved users.models.User one will be created
    'social_core.pipeline.social_auth.associate_user',
    'social_core.pipeline.social_auth.load_extra_data',
    'social_core.pipeline.user.user_details',
)


WSGI_APPLICATION = 'gig.wsgi.application'




# Password validation
# https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators

AUTH_PASSWORD_VALIDATORS = [
    #{
    #    'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
    #},
    {
        'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
    },
    {
        'NAME': 'users.validators.MaxLengthValidator',
        'OPTIONS': {
            'max_length': 32,
        }
    },
    {
        'NAME': 'users.validators.LettersDigitsValidator',
    }
#    {
#        'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
#    },
    #{
    #    'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
    #},
]


# Internationalization
# https://docs.djangoproject.com/en/2.1/topics/i18n/

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'CET'

USE_I18N = True

USE_L10N = True

USE_TZ = True


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

STATIC_URL = '/static/'

STATICFILES_DIRS = (
    os.path.join(BASE_DIR, 'static'),
)

STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')

import cloudinary

cloudinary.config(
  cloud_name = env_config.get('CLOUDINARY_CLOUD_NAME'),
  api_key = env_config.get('CLOUDINARY_API_KEY'),
  api_secret = env_config.get('CLOUDINARY_API_SECRET')
)


REST_FRAMEWORK = {
    # Use Django's standard `django.contrib.auth` permissions,
    # or allow read-only access for unauthenticated users.
    'DEFAULT_PERMISSION_CLASSES': [
        'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly'
    ]
}

e82809269c4be2dff31147434231509e30488c4b
<mask token>

<mask token>
cloudinary.config(cloud_name=env_config.get('CLOUDINARY_CLOUD_NAME'),
    api_key=env_config.get('CLOUDINARY_API_KEY'), api_secret=env_config.get
    ('CLOUDINARY_API_SECRET'))
<mask token>

<mask token>
BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(
    __file__))))
env_config = Config(RepositoryEnv(os.path.join(BASE_DIR, '.env')))
SECRET_KEY = env_config.get('SECRET_KEY')
ALLOWED_HOSTS = ['gig.pythonanywhere.com']
AUTH_USER_MODEL = 'users.User'
EMAIL_USE_TLS = True
EMAIL_HOST = env_config.get('EMAIL_HOST')
EMAIL_HOST_USER = env_config.get('EMAIL_HOST_USER')
EMAIL_HOST_PASSWORD = env_config.get('EMAIL_HOST_PASSWORD')
EMAIL_PORT = env_config.get('EMAIL_PORT', cast=int)
INSTALLED_APPS = ['users.apps.UsersConfig', 'artists.apps.ArtistsConfig',
    'musicians.apps.MusiciansConfig', 'events.apps.EventsConfig',
    'django.contrib.admin', 'django.contrib.auth',
    'django.contrib.contenttypes', 'django.contrib.sessions',
    'django.contrib.messages', 'django.contrib.staticfiles',
    'social_django', 'cloudinary', 'rest_framework']
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',
    'social_django.middleware.SocialAuthExceptionMiddleware']
ROOT_URLCONF = 'gig.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',
    'social_django.context_processors.backends',
    'social_django.context_processors.login_redirect']}}]
AUTHENTICATION_BACKENDS = ('social_core.backends.facebook.FacebookOAuth2',
    'social_core.backends.open_id.OpenIdAuth',
    'social_core.backends.google.GoogleOpenId',
    'social_core.backends.google.GoogleOAuth2',
    'django.contrib.auth.backends.ModelBackend')
SOCIAL_AUTH_FACEBOOK_API_VERSION = '2.10'
SOCIAL_AUTH_FACEBOOK_KEY = env_config.get('SOCIAL_AUTH_FACEBOOK_KEY')
SOCIAL_AUTH_FACEBOOK_SECRET = env_config.get('SOCIAL_AUTH_FACEBOOK_SECRET')
SOCIAL_AUTH_FACEBOOK_SCOPE = ['email']
SOCIAL_FACEBOOK_PROFILE_EXTRA_PARAMS = {'fields': 'id,name,email'}
SOCIAL_AUTH_FACEBOOK_AUTH_EXTRA_ARGUMENTS = {'local': 'ru_RU', 'fields':
    'id, name, email, age_rang'}
SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = env_config.get('SOCIAL_AUTH_GOOGLE_OAUTH2_KEY')
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = env_config.get(
    'SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET')
LOGIN_URL = 'users:login'
LOGOUT_URL = 'logout'
LOGIN_REDIRECT_URL = 'home'
LOGOUT_REDIRECT_URL = 'home'
SOCIAL_AUTH_PIPELINE = ('social_core.pipeline.social_auth.social_details',
    'social_core.pipeline.social_auth.social_uid',
    'social_core.pipeline.social_auth.auth_allowed',
    'social_core.pipeline.social_auth.social_user',
    'social_core.pipeline.user.get_username',
    'users.social_auth.retrieve_email', 'users.social_auth.retrieve_user',
    'users.social_auth.request_password', 'users.social_auth.create_user',
    'social_core.pipeline.social_auth.associate_user',
    'social_core.pipeline.social_auth.load_extra_data',
    'social_core.pipeline.user.user_details')
WSGI_APPLICATION = 'gig.wsgi.application'
AUTH_PASSWORD_VALIDATORS = [{'NAME':
    'django.contrib.auth.password_validation.MinimumLengthValidator'}, {
    'NAME': 'users.validators.MaxLengthValidator', 'OPTIONS': {'max_length':
    32}}, {'NAME': 'users.validators.LettersDigitsValidator'}]
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'CET'
USE_I18N = True
USE_L10N = True
USE_TZ = True
STATIC_URL = '/static/'
STATICFILES_DIRS = os.path.join(BASE_DIR, 'static'),
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
<mask token>
cloudinary.config(cloud_name=env_config.get('CLOUDINARY_CLOUD_NAME'),
    api_key=env_config.get('CLOUDINARY_API_KEY'), api_secret=env_config.get
    ('CLOUDINARY_API_SECRET'))
REST_FRAMEWORK = {'DEFAULT_PERMISSION_CLASSES': [
    'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly']}

<mask token>
import os
from decouple import Config, RepositoryEnv
BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(
    __file__))))
env_config = Config(RepositoryEnv(os.path.join(BASE_DIR, '.env')))
SECRET_KEY = env_config.get('SECRET_KEY')
ALLOWED_HOSTS = ['gig.pythonanywhere.com']
AUTH_USER_MODEL = 'users.User'
EMAIL_USE_TLS = True
EMAIL_HOST = env_config.get('EMAIL_HOST')
EMAIL_HOST_USER = env_config.get('EMAIL_HOST_USER')
EMAIL_HOST_PASSWORD = env_config.get('EMAIL_HOST_PASSWORD')
EMAIL_PORT = env_config.get('EMAIL_PORT', cast=int)
INSTALLED_APPS = ['users.apps.UsersConfig', 'artists.apps.ArtistsConfig',
    'musicians.apps.MusiciansConfig', 'events.apps.EventsConfig',
    'django.contrib.admin', 'django.contrib.auth',
    'django.contrib.contenttypes', 'django.contrib.sessions',
    'django.contrib.messages', 'django.contrib.staticfiles',
    'social_django', 'cloudinary', 'rest_framework']
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',
    'social_django.middleware.SocialAuthExceptionMiddleware']
ROOT_URLCONF = 'gig.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',
    'social_django.context_processors.backends',
    'social_django.context_processors.login_redirect']}}]
AUTHENTICATION_BACKENDS = ('social_core.backends.facebook.FacebookOAuth2',
    'social_core.backends.open_id.OpenIdAuth',
    'social_core.backends.google.GoogleOpenId',
    'social_core.backends.google.GoogleOAuth2',
    'django.contrib.auth.backends.ModelBackend')
SOCIAL_AUTH_FACEBOOK_API_VERSION = '2.10'
SOCIAL_AUTH_FACEBOOK_KEY = env_config.get('SOCIAL_AUTH_FACEBOOK_KEY')
SOCIAL_AUTH_FACEBOOK_SECRET = env_config.get('SOCIAL_AUTH_FACEBOOK_SECRET')
SOCIAL_AUTH_FACEBOOK_SCOPE = ['email']
SOCIAL_FACEBOOK_PROFILE_EXTRA_PARAMS = {'fields': 'id,name,email'}
SOCIAL_AUTH_FACEBOOK_AUTH_EXTRA_ARGUMENTS = {'local': 'ru_RU', 'fields':
    'id, name, email, age_rang'}
SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = env_config.get('SOCIAL_AUTH_GOOGLE_OAUTH2_KEY')
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = env_config.get(
    'SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET')
LOGIN_URL = 'users:login'
LOGOUT_URL = 'logout'
LOGIN_REDIRECT_URL = 'home'
LOGOUT_REDIRECT_URL = 'home'
SOCIAL_AUTH_PIPELINE = ('social_core.pipeline.social_auth.social_details',
    'social_core.pipeline.social_auth.social_uid',
    'social_core.pipeline.social_auth.auth_allowed',
    'social_core.pipeline.social_auth.social_user',
    'social_core.pipeline.user.get_username',
    'users.social_auth.retrieve_email', 'users.social_auth.retrieve_user',
    'users.social_auth.request_password', 'users.social_auth.create_user',
    'social_core.pipeline.social_auth.associate_user',
    'social_core.pipeline.social_auth.load_extra_data',
    'social_core.pipeline.user.user_details')
WSGI_APPLICATION = 'gig.wsgi.application'
AUTH_PASSWORD_VALIDATORS = [{'NAME':
    'django.contrib.auth.password_validation.MinimumLengthValidator'}, {
    'NAME': 'users.validators.MaxLengthValidator', 'OPTIONS': {'max_length':
    32}}, {'NAME': 'users.validators.LettersDigitsValidator'}]
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'CET'
USE_I18N = True
USE_L10N = True
USE_TZ = True
STATIC_URL = '/static/'
STATICFILES_DIRS = os.path.join(BASE_DIR, 'static'),
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
import cloudinary
cloudinary.config(cloud_name=env_config.get('CLOUDINARY_CLOUD_NAME'),
    api_key=env_config.get('CLOUDINARY_API_KEY'), api_secret=env_config.get
    ('CLOUDINARY_API_SECRET'))
REST_FRAMEWORK = {'DEFAULT_PERMISSION_CLASSES': [
    'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly']}

"""
Django settings for gig project.

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

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

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

import os

from decouple import Config, RepositoryEnv

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

#Reference to the file gig_root/gig/settings/'.env'
env_config = Config(RepositoryEnv(os.path.join(BASE_DIR, '.env')))


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

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


ALLOWED_HOSTS = ['gig.pythonanywhere.com']


# Application definition

AUTH_USER_MODEL = "users.User"

EMAIL_USE_TLS = True
EMAIL_HOST = env_config.get('EMAIL_HOST')
EMAIL_HOST_USER = env_config.get('EMAIL_HOST_USER')
EMAIL_HOST_PASSWORD = env_config.get('EMAIL_HOST_PASSWORD')
EMAIL_PORT = env_config.get('EMAIL_PORT', cast=int)

INSTALLED_APPS = [
    'users.apps.UsersConfig',
    'artists.apps.ArtistsConfig',
    'musicians.apps.MusiciansConfig',
    'events.apps.EventsConfig',
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',

    #Third-party apps
    'social_django',
    'cloudinary',
    'rest_framework'

    #local apps

]

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',
    'social_django.middleware.SocialAuthExceptionMiddleware',
]

ROOT_URLCONF = 'gig.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',

                'social_django.context_processors.backends',
                'social_django.context_processors.login_redirect',
            ],
        },
    },
]



AUTHENTICATION_BACKENDS = (
    'social_core.backends.facebook.FacebookOAuth2',
    'social_core.backends.open_id.OpenIdAuth',
    'social_core.backends.google.GoogleOpenId',
    'social_core.backends.google.GoogleOAuth2',
    'django.contrib.auth.backends.ModelBackend',
)

#Facebook settings
SOCIAL_AUTH_FACEBOOK_API_VERSION = '2.10'
SOCIAL_AUTH_FACEBOOK_KEY = env_config.get('SOCIAL_AUTH_FACEBOOK_KEY')
SOCIAL_AUTH_FACEBOOK_SECRET = env_config.get('SOCIAL_AUTH_FACEBOOK_SECRET')
SOCIAL_AUTH_FACEBOOK_SCOPE = ['email']
SOCIAL_FACEBOOK_PROFILE_EXTRA_PARAMS = {
        'fields': 'id,name,email',
}
SOCIAL_AUTH_FACEBOOK_AUTH_EXTRA_ARGUMENTS = {
    'local': 'ru_RU',
    'fields': 'id, name, email, age_rang',
}


#Google settings
SOCIAL_AUTH_GOOGLE_OAUTH2_KEY =env_config.get('SOCIAL_AUTH_GOOGLE_OAUTH2_KEY')
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = env_config.get('SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET')


LOGIN_URL = 'users:login'
LOGOUT_URL = 'logout'
LOGIN_REDIRECT_URL = 'home'
LOGOUT_REDIRECT_URL = 'home'

#pipeline that represents the operations that are execute when information is retrieved
#from social medias.
SOCIAL_AUTH_PIPELINE = (

    'social_core.pipeline.social_auth.social_details',
    'social_core.pipeline.social_auth.social_uid',
    'social_core.pipeline.social_auth.auth_allowed',


    #The next function calls will retrieve a users.models.User if this one exits. To retrieve it a social_user profile is first retrieved and then asossciated
    #User is then retrieved
    'social_core.pipeline.social_auth.social_user',
    'social_core.pipeline.user.get_username',

    #In case we have no User instance in db. The email associated to the social login will be retrieved and a users.model.User will be created
    'users.social_auth.retrieve_email',
    'users.social_auth.retrieve_user',

    #Request for the user to chose a password and confirm credentials
    'users.social_auth.request_password',
    #Create a User account if the user signs in for the first time
    'users.social_auth.create_user',

    #If no social_user model exists associated to the created or retrieved users.models.User one will be created
    'social_core.pipeline.social_auth.associate_user',
    'social_core.pipeline.social_auth.load_extra_data',
    'social_core.pipeline.user.user_details',
)


WSGI_APPLICATION = 'gig.wsgi.application'




# Password validation
# https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators

AUTH_PASSWORD_VALIDATORS = [
    #{
    #    'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
    #},
    {
        'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
    },
    {
        'NAME': 'users.validators.MaxLengthValidator',
        'OPTIONS': {
            'max_length': 32,
        }
    },
    {
        'NAME': 'users.validators.LettersDigitsValidator',
    }
#    {
#        'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
#    },
    #{
    #    'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
    #},
]


# Internationalization
# https://docs.djangoproject.com/en/2.1/topics/i18n/

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'CET'

USE_I18N = True

USE_L10N = True

USE_TZ = True


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

STATIC_URL = '/static/'

STATICFILES_DIRS = (
    os.path.join(BASE_DIR, 'static'),
)

STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')

import cloudinary

cloudinary.config(
  cloud_name = env_config.get('CLOUDINARY_CLOUD_NAME'),
  api_key = env_config.get('CLOUDINARY_API_KEY'),
  api_secret = env_config.get('CLOUDINARY_API_SECRET')
)


REST_FRAMEWORK = {
    # Use Django's standard `django.contrib.auth` permissions,
    # or allow read-only access for unauthenticated users.
    'DEFAULT_PERMISSION_CLASSES': [
        'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly'
    ]
}
