1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-12-26 05:02:23 +00:00
plateforme-tfjm2/tfjm/settings_prod.py

31 lines
897 B
Python
Raw Normal View History

2020-05-05 04:16:31 +00:00
import os
# Break it, fix it!
2020-05-06 17:54:50 +00:00
DEBUG = False
2020-05-05 04:16:31 +00:00
# Mandatory !
2020-09-19 18:59:52 +00:00
ALLOWED_HOSTS = ['inscription.tfjm.org', 'plateforme.tfjm.org']
2020-05-05 04:16:31 +00:00
SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY', 'CHANGE_ME_IN_ENV_SETTINGS')
# Emails
2020-09-19 19:13:45 +00:00
EMAIL_BACKEND = 'mailer.backend.DbBackend'
MAILER_EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
2020-05-05 04:16:31 +00:00
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")
2020-05-05 04:16:31 +00:00
DEFAULT_FROM_EMAIL = os.getenv('FROM_EMAIL', 'Contact TFJM² <contact@tfjm.org>')
SERVER_EMAIL = os.getenv('SERVER_EMAIL', 'contact@tfjm.org')
2020-05-05 04:16:31 +00:00
# Security settings
SECURE_CONTENT_TYPE_NOSNIFF = False
SECURE_BROWSER_XSS_FILTER = False
SESSION_COOKIE_SECURE = False
CSRF_COOKIE_SECURE = False
CSRF_COOKIE_HTTPONLY = False
X_FRAME_OPTIONS = 'DENY'
SESSION_COOKIE_AGE = 60 * 60 * 3