

# Rest Framework configuration
REST_FRAMEWORK = {
    'DATETIME_FORMAT': "%Y-%m-%dT%H:%M:%S.%f%z",
    # Use Django's standard `django.contrib.auth` permissions,
    # or allow read-only access for unauthenticated users.
    'DEFAULT_PERMISSION_CLASSES': [
        'rest_framework.permissions.IsAuthenticated',
    ],
    'DEFAULT_AUTHENTICATION_CLASSES': [
        'rest_framework.authentication.BasicAuthentication',
        'rest_framework.authentication.TokenAuthentication',
        'rest_framework.authentication.SessionAuthentication',
    ]
}

# EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
# EMAIL_HOST = 'smtp-xlr.alwaysdata.net'
# EMAIL_PORT = 587
EMAIL_HOST_USER = 'automatic@padelclub.app'
EMAIL_HOST_PASSWORD = 'XLR@Sport@2024'
# EMAIL_USE_TLS = True
DEFAULT_FROM_EMAIL = 'Padel Club <automatic@padelclub.app>'

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp-xlr.alwaysdata.net'
EMAIL_PORT = 587
#EMAIL_HOST_USER = 'xlr@alwaysdata.net'
#EMAIL_HOST_PASSWORD = 'XLRSport$2024'
EMAIL_USE_TLS = True
#DEFAULT_FROM_EMAIL = 'Padel Club <xlr@alwaysdata.net>'

CACHES = {
    'default': {
        'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
    },
    'qr-code': {
        'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
        'LOCATION': 'qr-code-cache',
        'TIMEOUT': 3600
    }
}

QR_CODE_CACHE_ALIAS = 'qr-code'

SYNC_APPS = {
    'sync': {},
    'tournaments': { 'exclude': ['Log', 'FailedApiCall', 'DeviceToken'] }
}

STRIPE_CURRENCY = 'eur'
# Add managers who should receive internal emails
SHOP_MANAGERS = [
    ('Shop Admin', 'shop-admin@padelclub.app'),
    # ('Laurent Morvillier', 'laurent@padelclub.app'),
    # ('Xavier Rousset', 'xavier@padelclub.app'),
]
SHOP_SITE_ROOT_URL = 'https://padelclub.app'
SHOP_SUPPORT_EMAIL = 'shop@padelclub.app'
