2020-03-23 21:28:07 +01:00
|
|
|
"""
|
|
|
|
Django prod settings for cas_eleves project.
|
|
|
|
|
|
|
|
Generated by 'django-admin startproject' using Django 2.1.15.
|
|
|
|
|
|
|
|
For more information on this file, see
|
|
|
|
https://docs.djangoproject.com/en/2.1/topics/settings/
|
|
|
|
|
|
|
|
For the full list of settings and their values, see
|
|
|
|
https://docs.djangoproject.com/en/2.1/ref/settings/
|
|
|
|
"""
|
|
|
|
|
|
|
|
import os
|
|
|
|
from .settings_base import *
|
|
|
|
|
|
|
|
# SECURITY WARNING: keep the secret key used in production secret!
|
2020-03-26 12:00:43 +01:00
|
|
|
SECRET_KEY = "CHANGE_ME" # FIXME eg. the result of `pwgen 60 1`
|
2020-03-23 21:28:07 +01:00
|
|
|
|
|
|
|
# SECURITY WARNING: don't run with debug turned on in production!
|
|
|
|
DEBUG = False
|
|
|
|
|
2020-03-26 12:00:43 +01:00
|
|
|
ALLOWED_HOSTS = [] # FIXME eg. `['cas.eleves.ens.fr']`
|
2020-03-23 21:28:07 +01:00
|
|
|
|
|
|
|
# Database
|
|
|
|
# https://docs.djangoproject.com/en/2.1/ref/settings/#databases
|
|
|
|
|
2020-03-26 12:00:43 +01:00
|
|
|
DATABASES = { # FIXME change to something else, see URL above
|
2020-03-23 21:28:07 +01:00
|
|
|
"default": {
|
|
|
|
"ENGINE": "django.db.backends.sqlite3",
|
|
|
|
"NAME": os.path.join(BASE_DIR, "db.sqlite3"),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# Internationalization
|
|
|
|
# https://docs.djangoproject.com/en/2.1/topics/i18n/
|
|
|
|
|
|
|
|
LANGUAGE_CODE = "fr-fr"
|
|
|
|
TIME_ZONE = "Europe/Paris"
|
|
|
|
USE_I18N = True
|
|
|
|
USE_L10N = True
|
|
|
|
USE_TZ = True
|
2020-03-26 12:00:43 +01:00
|
|
|
|
|
|
|
# CAS backend settings
|
|
|
|
# See https://github.com/nitmir/django-cas-server#settings
|
|
|
|
|
|
|
|
CAS_AUTH_CLASS = "cas_server.auth.LdapAuthUser"
|
|
|
|
CAS_LDAP_SERVER = "example.com" # FIXME
|
|
|
|
CAS_LDAP_USER = "" # FIXME or remove if unnecessary
|
|
|
|
CAS_LDAP_PASSWORD = "" # FIXME or remove if unnecessary
|
|
|
|
# CAS_LDAP_BASE_DN = "ou=data,dc=example,dc=com"
|
|
|
|
# CAS_LDAP_USER_QUERY = "(uid=%s)"
|
|
|
|
# CAS_LDAP_USERNAME_ATTR = "uid" # FIXME
|
|
|
|
# CAS_LDAP_PASSWORD_ATTR = "userPassword" # FIXME
|
|
|
|
# CAS_LDAP_PASSWORD_CHECK = "ldap" # FIXME
|