84 lines
2.6 KiB
Plaintext
84 lines
2.6 KiB
Plaintext
# Django local_settings for polynum project
|
|
|
|
# See settings.py for default values
|
|
|
|
DEBUG = True # set to False in production !
|
|
TEMPLATE_DEBUG = DEBUG
|
|
|
|
# use PostgreSQL in production
|
|
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.
|
|
}
|
|
}
|
|
|
|
#
|
|
# Upload directory
|
|
#
|
|
DOCUMENTS_UPLOAD_DIRECTORY = '/opt/polynum/uploads/'
|
|
|
|
#
|
|
# Authentification with CAS & LDAP
|
|
#
|
|
CAS_SERVER_URL = 'https://www.univ.fr/cas/' # CAS server URL, if empty CAS login is disabled
|
|
LDAP_URL = 'ldaps://' # LDAP server URL
|
|
LDAP_BIND_DN = '' # DN to authenticate to the LDAP server
|
|
LDAP_BIND_PASSWORD = 'abdef' # and its password
|
|
LDAP_USER_QUERY = '' # query to retrieve user, %s is the CAS username
|
|
LDAP_BASE = '' # base DN for the query
|
|
|
|
#
|
|
# Design
|
|
#
|
|
# grappelli admin -- see http://readthedocs.org/docs/django-grappelli
|
|
GRAPPELLI_ADMIN_TITLE = 'Univ - 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
|
|
#
|
|
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,
|
|
},
|
|
}
|
|
}
|
|
|