This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
polynum/local_settings.py.example

103 lines
3.1 KiB
Plaintext

# Django local_settings for polynum project
# See settings.py for default values
DEBUG = True
#DEBUG = False # for production
TEMPLATE_DEBUG = DEBUG
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': '/tmp/polynum',
}
}
# production : use PostgreSQL
#DATABASES = {
# 'default': {
# 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
# 'NAME': 'polynum', # Or path to database file if using sqlite3.
# 'USER': 'polynum', # Not used with sqlite3.
# 'PASSWORD': 'abcdef', # Not used with sqlite3.
# 'HOST': 'db.univ.fr', # Set to empty string for localhost. Not used with sqlite3.
# 'PORT': '', # Set to empty string for default. Not used with sqlite3.
# }
#}
# The default site URL
SITE_URL = 'https://polynum.univ.fr'
#
# Upload directory (polynum must have read+write permissions on it)
#
MEDIA_ROOT = '/var/opt/polynum/media/'
#
# Authentification with CAS & LDAP
#
CAS_SERVER_URL = None # CAS server URL, for ex. 'https://cas.univ.fr/' -- if None, CAS login is disabled
LDAP_URL = 'ldaps://...' # LDAP server URL
LDAP_BIND_DN = 'uid=...,ou=...' # DN to authenticate to the LDAP server
LDAP_BIND_PASSWORD = '...' # and its password
LDAP_USER_QUERY = 'supannAliasLogin=%s' # query to retrieve user, %s is the CAS username
LDAP_BASE = 'dc=univ,dc=fr' # base DN for the query
#
# Design
#
# static files -- must be created with "polynum-manage.py collectstatic"
STATIC_ROOT = '/opt/polynum/static'
# Additional locations of static files (to override default static files)
STATICFILES_DIRS = (
# Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
)
# grappelli admin -- see http://readthedocs.org/docs/django-grappelli
GRAPPELLI_ADMIN_TITLE = 'Administration de PolyNum'
# templates
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
'/opt/polynum/local/templates',
'/opt/polynum/polynum/templates',
)
#
# OAI METADATA for OAI-PMH exports
#
OAI_ADMIN_EMAIL = 'admin@univ.fr'
OAI_TEXT = 'Polynum documents'
OAI_REPOSITORY_NAME = 'Polynum OAI-PMH repository'
#
# Logging configuration
# See http://docs.djangoproject.com/en/dev/topics/logging
#
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'filters': {
'require_debug_false': {
'()': 'django.utils.log.RequireDebugFalse'
}
},
'handlers': {
'mail_admins': {
'level': 'ERROR',
'filters': ['require_debug_false'],
'class': 'django.utils.log.AdminEmailHandler'
}
},
'loggers': {
'django.request': {
'handlers': ['mail_admins'],
'level': 'ERROR',
'propagate': True,
},
}
}