From e45296a593eef92a861fa086b2967ead48ad999f Mon Sep 17 00:00:00 2001
From: Thomas NOEL code de l'application Django Polynum scripts associés au projet environnement virtuel Python (voir plus loin) répertoire de configuration répertoire de configuration répertoire des données (fichiers PDF) La configuration de l'application se fait dans La configuration de l'application se fait dans Un fichier d'exemple Si vous avez installé Polynum à partir du paquet, le modèle est placé
dans /opt/polynum/polynum
/opt/polynum/bin
- /opt/polynum/virtualenv
+ /etc/polynum
+ /etc/opt/polynum
@@ -151,18 +152,18 @@ pour s'exécuter.
/var/opt/polynum
/etc/polynum/local_settings.py
/etc/opt/polynum/local_settings.py
local_settings.py.example
est fourni avec
Polynum, c'est un modèle pour la création de
-/etc/polynum/local_settings.py
: il contient la liste des
+/etc/opt/polynum/local_settings.py
: il contient la liste des
paramétrages possibles avec explications et exemples./usr/share/doc/polynum/
, il vous suffit donc de faire :/usr/share/doc/polynum/
, il vous suffit donc de faire :
Polynum peut authentifier les utilisateurs via CAS et LDAP. Dans
-/etc/polynum/local_settings.py
adapter les paramètres suivants
+/etc/opt/polynum/local_settings.py
adapter les paramètres suivants
:
-(... extrait de /etc/polynum/local_settings.py ...)
+(... extrait de /etc/opt/polynum/local_settings.py ...)
CAS_SERVER_URL = "https://cas.univ.fr/" # CAS server URL
LDAP_URL = "ldaps://ldap.univ.fr" # LDAP server URL
diff --git a/local_settings.py.example b/local_settings.py.example
index e560d0a..c29e52e 100644
--- a/local_settings.py.example
+++ b/local_settings.py.example
@@ -2,41 +2,50 @@
# See settings.py for default values
-DEBUG = True # set to False in production !
+DEBUG = True
+#DEBUG = False # for 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.
+ '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.
+# }
+#}
#
-# Upload directory
+# Upload directory (polynum must have read+write permissions on it)
#
-DOCUMENTS_UPLOAD_DIRECTORY = '/opt/polynum/uploads/'
+MEDIA_ROOT = '/var/opt/polynum/media/'
#
# 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
+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 -- to create with "polynum-manage.py collectstatic"
+STATIC_ROOT = '/opt/polynum/static'
# grappelli admin -- see http://readthedocs.org/docs/django-grappelli
-GRAPPELLI_ADMIN_TITLE = 'Univ - Administration de PolyNum'
+GRAPPELLI_ADMIN_TITLE = 'Administration de PolyNum'
# templates
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
@@ -47,7 +56,7 @@ TEMPLATE_DIRS = (
)
#
-# OAI METADATA
+# OAI METADATA for OAI-PMH exports
#
OAI_ADMIN_EMAIL = 'admin@univ.fr'
OAI_TEXT = 'Polynum documents'