2017-09-21 10:54:03 +02:00
|
|
|
import os
|
2024-10-23 10:29:17 +02:00
|
|
|
|
2017-09-21 10:54:03 +02:00
|
|
|
from .settings_base import *
|
|
|
|
|
|
|
|
# SECURITY WARNING: keep the secret key used in production secret!
|
|
|
|
# For production, generate a fresh one, eg. with
|
|
|
|
# pwgen -sy 60 1
|
2024-10-23 10:29:17 +02:00
|
|
|
SECRET_KEY = "k340m-_mw#i#up8ajv9$$=$tgpji3f3j!jafj2+ken*@wo9u0%"
|
2017-09-21 10:54:03 +02:00
|
|
|
|
|
|
|
# SECURITY WARNING: don't run with debug turned on in production!
|
|
|
|
DEBUG = True
|
|
|
|
|
|
|
|
ALLOWED_HOSTS = []
|
|
|
|
|
|
|
|
# Database
|
|
|
|
# https://docs.djangoproject.com/en/1.11/ref/settings/#databases
|
|
|
|
DATABASES = {
|
2024-10-23 10:29:17 +02:00
|
|
|
"default": {
|
|
|
|
"ENGINE": "django.db.backends.sqlite3",
|
|
|
|
"NAME": os.path.join(BASE_DIR, "db.sqlite3"),
|
2017-09-21 10:54:03 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# Internationalization
|
|
|
|
# https://docs.djangoproject.com/en/1.11/topics/i18n/
|
2024-10-23 10:29:17 +02:00
|
|
|
LANGUAGE_CODE = "fr-fr"
|
|
|
|
TIME_ZONE = "Europe/Paris"
|
2017-09-21 10:54:03 +02:00
|
|
|
|
|
|
|
USE_I18N = True
|
|
|
|
USE_L10N = True
|
|
|
|
USE_TZ = True
|
|
|
|
|
|
|
|
# Paths
|
|
|
|
|
2024-10-23 10:29:17 +02:00
|
|
|
STATIC_ROOT = os.path.join(PUBLIC_DIR, "static")
|
|
|
|
MEDIA_ROOT = os.path.join(PUBLIC_DIR, "media")
|
2017-10-14 16:22:23 +02:00
|
|
|
|
|
|
|
# Cas
|
2024-10-23 10:29:17 +02:00
|
|
|
CAS_SERVER_URL = "https://cas.eleves.ens.fr/"
|
|
|
|
CAS_VERIFY_URL = "https://cas.eleves.ens.fr/"
|
|
|
|
CAS_VERSION = "CAS_2_SAML_1_0"
|
2017-10-14 16:22:23 +02:00
|
|
|
CAS_IGNORE_REFERER = True
|
2024-10-23 10:29:17 +02:00
|
|
|
CAS_FORCE_CHANGE_USERNAME_CASE = "lower"
|
|
|
|
CAS_REDIRECT_URL = "/"
|
2017-10-14 16:22:23 +02:00
|
|
|
CAS_EMAIL_FORMAT = "%s@clipper.ens.fr"
|
|
|
|
CAS_LOGOUT_COMPLETELY = False
|
2017-10-14 19:36:13 +02:00
|
|
|
|
|
|
|
# Auth
|
2024-10-23 10:29:17 +02:00
|
|
|
RHOSTS_PATH = "rhosts_dev"
|