Sujet précédent

1.3. How to upgrade an installation of OpenPLM

Sujet suivant

3. Applications

Cette page

Autres langues

2. settings — Settings

Vous pouvez définir quelques variables dans settings.py pour adapter OpenPLM à vos besoins. Voici les plus communes :

settings.ugettext(s)
settings.INSTALLED_APPS = ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.admin', 'django.contrib.comments', 'django.contrib.humanize', 'django.contrib.messages', 'django.contrib.staticfiles', 'djcelery', 'haystack', 'south', 'openPLM.plmapp', 'openPLM.apps.rss', 'openPLM.apps.pdfgen', 'openPLM.apps.cad', 'openPLM.apps.computer', 'openPLM.apps.cae', 'openPLM.apps.office')

list of installed apps

settings.ALLOWED_HOSTS = ['www.example.com']

see ALLOWED_HOSTS

settings.EMAIL_FAIL_SILENTLY = True

True if mails sending should fail silently. If False, all connection errors to the SMTP server will be logged by celery (/var/log/celery/*.log).

settings.DOCUMENTS_DIR = '/var/openPLM/docs/'

directory that stores documents. Make sure to use a trailing slash.

settings.THUMBNAILS_DIR = '/var/django/openPLM/trunk/openPLM/media/thumbnails/'

directory that stores thumbnails. Make sure to use a trailing slash.

settings.THUMBNAILS_URL = '/media/thumbnails/'

URL where thumbnails are located . Make sure to use a trailing slash.

settings.EMAIL_OPENPLM = 'no-reply@openplm.example.com'

expeditor’s mail used when sending notification emails

settings.NEW_ACCOUNT_SUBJECT = u'New account on OpenPLM'

Subject of a sponsor mail. It can be a valid django template string, two variables are available: new_user and sponsor (User instances) for example, it could be u"Welcome {{new_user.get_full_name}}, {{sponsor.get_full_name}} has sponsored you on OpenPLM".

settings.MAX_FILE_SIZE = -1

Max file size for documents in bytes, -1 means illimited

set to True so that browsers ensure the cookie is only sent under an HTTPS connection

settings.FORCE_HTTPS = False

Force HTTPS connections

settings.HIDE_EMAILS = False

set to True to hide emails

settings.KEEP_ALL_FILES = False

Never delete files. If a user deletes a file, the file is deprecated instead of being deleted. Warning, if set to True, OpenPLM may consume a lot of disk place.