mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-11-26 22:47:08 +00:00
41 lines
1.2 KiB
Python
41 lines
1.2 KiB
Python
import os
|
|
|
|
DATABASES = {
|
|
'default': {
|
|
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
|
'NAME': os.environ.get('DJANGO_DB_NAME', 'tfjm'),
|
|
'USER': os.environ.get('DJANGO_DB_USER', 'tfjm'),
|
|
'PASSWORD': os.environ.get('DJANGO_DB_PASSWORD', 'CHANGE_ME_IN_ENV_SETTINGS'),
|
|
'HOST': os.environ.get('DJANGO_DB_HOST', 'localhost'),
|
|
'PORT': os.environ.get('DJANGO_DB_PORT', ''), # Use default port
|
|
}
|
|
}
|
|
|
|
# Break it, fix it!
|
|
DEBUG = False
|
|
|
|
# Mandatory !
|
|
ALLOWED_HOSTS = ['inscription.tfjm.org']
|
|
|
|
SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY', 'CHANGE_ME_IN_ENV_SETTINGS')
|
|
|
|
# Emails
|
|
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
|
EMAIL_USE_SSL = True
|
|
EMAIL_HOST = os.getenv("EMAIL_HOST")
|
|
EMAIL_PORT = os.getenv("EMAIL_PORT")
|
|
EMAIL_HOST_USER = os.getenv("EMAIL_HOST_USER")
|
|
EMAIL_HOST_PASSWORD = os.getenv("EMAIL_HOST_PASSWORD")
|
|
|
|
DEFAULT_FROM_EMAIL = 'Contact TFJM² <contact@tfjm.org>'
|
|
SERVER_EMAIL = 'contact@tfjm.org'
|
|
|
|
# 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
|