cas-eleves/cas_eleves/settings.prod.py
2020-03-26 12:00:43 +01:00

54 lines
1.5 KiB
Python

"""
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!
SECRET_KEY = "CHANGE_ME" # FIXME eg. the result of `pwgen 60 1`
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
ALLOWED_HOSTS = [] # FIXME eg. `['cas.eleves.ens.fr']`
# Database
# https://docs.djangoproject.com/en/2.1/ref/settings/#databases
DATABASES = { # FIXME change to something else, see URL above
"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
# 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