Settings

This section describes the available configuration options that can be defined in a project’s settings.py file.

global_settings.

The global_settings module provides minimal and sane default configuration values, that should work out of the box. Further options have to be configured in a project’s settings.py file (or as set by the ‘XMM_SETTINGS_MODULE’ environment variable) file to provide database access and to customize behaviour.

DEBUG = False
Type

boolean

When enabled, error pages will show stacktrace and more as an interactive HTML page.

Warning

Never enable DEBUG in a production environment.

USE_DEBUGGER = False
Type

boolean

When set, error pages will have an interactive debugger included.

TESTING = False
Type

boolean

Wether we’re running in test mode.

EXTERNAL_URL = ''
Type

str

A full URL where the front-end is reachable.

Example: 'http://xmm.customer.com/'

Type

boolean

Set the httponly flag on session cookies.

SECRET_KEY = None
Type

str

A string of random characters used for cryptographic functions.

PASSWORD_RESET_NOTIFY = False
Type

boolean

Show error messages when trying to reset a password for an invalid login.

PASSWORD_RESET_DAYS = 1
Type

int

Days a password reset link is valid for.

TIMEZONE = 'Europe/Zurich'
Type

str

Timezone used for all saved datetimes in the project database.

MONGODB_URL = None
Type

str

Connection string for MongoDB server.

Example: 'mongodb://user[:pass]@host:port/database'

REDIS_URL = 'redis://127.0.0.1:6379/0'
Type

str

Redis key-value server connection string.

Examples:

  • 'redis://[:password]@localhost:6379/0'

  • 'unix://[:password]@/path/to/socket.sock?db=0'

REDIS_PREFIX = 'xmm'
Type

str

Prefix for redis keys and pubsub channels.

ELASTICSEARCH_URL = 'localhost:9200'
Type

str

ElasticSearch connection string. Must not use a protocol prefix.

Example: 'localhost:9200'

CELERY_BROKER_URL = None
Type

str

Celery task queue broker connection string.

Examples:

  • 'redis://127.0.0.1:6379/0'

  • 'amqp://'

CELERY_RESULT_BACKEND = None
Type

str

Celery task results storage backend.

Examples:

  • 'redis://127.0.0.1:6379/0'

  • 'mongodb://'

BABEL_DEFAULT_LOCALE = 'de'
Type

str

Default language used in the user interface. Currently users cannot change this.

BABEL_DEFAULT_TIMEZONE = 'Europe/Zurich'
Type

str

Default timezone used in the user interface for datetimes. Must be an identifier as used in the tzdata table. Currently users cannot change this.

CLIPBOARD_LIMIT = 20
Type

int

Limit for entries allowed in the clipboard. if (CLIPBOARD_LIMIT + 1)nth element is added then the last one is deleted from the clipboard.

LANGUAGES = ['de']
Type

str[]

Language codes used for content in this installation.

DEFAULT_LANGUAGE = 'de'
Type

str

Default language used for stored content, must be one of LANGUAGES.

LANGUAGE_LABELS = {'de': 'Deutsch'}
Type

dict

Mapping from LANGUAGES codes to a human readable form.

LOCALE_MAPPING = {'de': 'de_CH'}
Type

dict

ISO language code mappings for LANGUAGES.

STATIC_ROOT = None
Type

str

Local base directory used to store static generated files.

MEDIA_ROOT = None
Type

str

Directory used to store user uploaded media files.

BINARIES = {'gm': 'gm', 'mongo': 'mongo', 'mongodump': 'mongodump', 'mongorestore': 'mongorestore'}
Type

dict

Paths to external binaries.

THUMBOR_URL = None
Type

str

Thumbor server address to process thumbnails. If None, XMM’s own system will be used.

THUMBOR_KEY = 'unsafe'
Type

str

Encryption key to generate safe URLs for Thumbor. If XMM is whitelisted this can be ‘unsafe’ to not sign URLs.

TASK_SCHEDULES = {'sys_cleanup': {'schedule': <crontab: 1 1 * * * (m/h/d/dM/MY)>, 'task': 'xmm.tasks.datacleanup.DataCleanupTask'}, 'sys_licensecheck': {'schedule': <crontab: 0 1 * * * (m/h/d/dM/MY)>, 'task': 'xmm.tasks.licensecheck.LicenseCheckTask'}}
Type

str[]

Import paths to Celery tasks classes that are available in the XMM.

TASK_IMPORTS = ['xmm.tasks.batchupdate.BatchUpdateTask', 'xmm.tasks.licensecheck.LicenseCheckTask']
Type

str[]

List of Task classes that can be called but not created as Task object.

WEBSOCKET_CERT_FILE = None
Type

str

Full path to the TLS/SSL certificate (usually a .pem file) to be used by the websocket service.

You may also set the WS_CERT_FILE environment variable.

WEBSOCKET_CERT_KEY = None
Type

str

Full path to the TLS/SSL certificate private key file (usually a .pem or .key file) to be used by the websocket service.

You may also set the WS_CERT_KEY environment variable.

COMMANDS = ('xmm.core.management.commands.check', 'xmm.core.management.commands.scaffold')
Type

str[]

Import paths of available commands for manage.py script.

PIPELINE_READERS = ['xmm.pipeline.readers.LocalFileSystemReader']
Type

str[]

Import paths for available data sources to use with imports.

PIPELINE_WRITERS = ['xmm.pipeline.writers.CSVWriter', 'xmm.pipeline.writers.ExcelWriter', 'xmm.pipeline.writers.JSONWriter', 'xmm.pipeline.writers.XMLWriter']
Type

str[]

Import paths for available output formats for data exports.

LICENSEE = 'unknown'
Type

str

Name of the licensee of this installation.

SYSTEM_USER_SOFT_LIMIT = 0
Type

int

Set a soft limit for the number of allowed users. If the number of users exceed this limit, the system sends an email. Set to None to deactivate the check.

SYSTEM_USER_SOFT_LIMIT_EMAIL = ''
Type

str

Send user soft limit exceedance emails to this email address.

SYSTEM_BADGE_TEXT = None
Type

str

Show a badge for this XMM deployment to clearly mark in which environment you’re currently working.

SYSTEM_BADGE_TEXT_LONG = None
Type

str

Longer version for SYSTEM_BADGE_TEXT to be displayed in the XMM status bar at the bottom instead.

SYSTEM_BADGE_COLOR = '#f24f39'
Type

str

Optionally specify a background color for this badge. Can be any valid CSS color, defaults to #f24f39.

Recommended colors are:

  • #308db9 Masterdata Blue

  • #f24f39 Collections Red

  • #209b94 CMS Turquoise

  • #4aa46a Media Green

  • #c29942 Admin Yellow

ALLOW_DYNAMIC_TAGS = True
Type

bool

Allow creating tags on the fly in Tag input fields. Set to False to only allow selecting existing tags that can be created in the admin section.

LOGGING
Type

dict

Application logging configuration dict.

Full schema documentation available at the Python documentation.