2020-12-27 10:49:54 +00:00
|
|
|
# Copyright (C) 2020 by Animath
|
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
|
|
|
import os
|
|
|
|
|
|
|
|
# Break it, fix it!
|
|
|
|
DEBUG = False
|
|
|
|
|
|
|
|
# Mandatory !
|
|
|
|
ALLOWED_HOSTS = ['inscription.tfjm.org', 'plateforme.tfjm.org']
|
|
|
|
|
|
|
|
# Emails
|
|
|
|
EMAIL_BACKEND = 'mailer.backend.DbBackend'
|
|
|
|
MAILER_EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
|
|
|
EMAIL_USE_SSL = True
|
|
|
|
EMAIL_HOST = os.getenv("SMTP_HOST")
|
|
|
|
EMAIL_PORT = os.getenv("SMTP_PORT")
|
|
|
|
EMAIL_HOST_USER = os.getenv("SMTP_HOST_USER")
|
|
|
|
EMAIL_HOST_PASSWORD = os.getenv("SMTP_HOST_PASSWORD")
|
|
|
|
|
|
|
|
SERVER_EMAIL = os.getenv('SERVER_EMAIL', 'contact@tfjm.org')
|
2021-01-21 22:43:59 +00:00
|
|
|
DEFAULT_FROM_EMAIL = os.getenv('FROM_EMAIL', 'Contact TFJM²') + f" <{SERVER_EMAIL}>"
|
2020-12-27 10:49:54 +00:00
|
|
|
|
|
|
|
# Security settings
|
|
|
|
SECURE_CONTENT_TYPE_NOSNIFF = False
|
|
|
|
SESSION_COOKIE_SECURE = False
|
|
|
|
CSRF_COOKIE_SECURE = False
|
|
|
|
CSRF_COOKIE_HTTPONLY = False
|
|
|
|
X_FRAME_OPTIONS = 'DENY'
|
|
|
|
SESSION_COOKIE_AGE = 60 * 60 * 3
|
2023-04-11 21:05:58 +00:00
|
|
|
|
|
|
|
CHANNEL_LAYERS = {
|
|
|
|
"default": {
|
|
|
|
"BACKEND": "channels_redis.core.RedisChannelLayer",
|
|
|
|
"CONFIG": {
|
|
|
|
"hosts": [(os.getenv('REDIS_SERVER_HOST', 'localhost'), os.getenv('REDIS_SERVER_PORT', 6379))],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
2024-01-13 17:32:30 +00:00
|
|
|
|
|
|
|
HAYSTACK_CONNECTIONS = {
|
|
|
|
'default': {
|
|
|
|
'ENGINE': 'haystack.backends.elasticsearch7_backend.Elasticsearch7SearchEngine',
|
|
|
|
'URL': 'http://elasticsearch:9200/',
|
2024-01-13 18:33:31 +00:00
|
|
|
'INDEX_NAME': os.getenv('HAYSTACK_INDEX_NAME', 'inscription-tfjm'),
|
2024-01-13 17:32:30 +00:00
|
|
|
}
|
|
|
|
}
|
2024-01-13 17:47:17 +00:00
|
|
|
|
|
|
|
HAYSTACK_SIGNAL_PROCESSOR = 'haystack.signals.RealtimeSignalProcessor'
|