Configuration

All DEMO_* settings are optional.

DEMO_DB_NAME_TEMPLATE

A string with the %(num)s formatting variable which is used as a template for database names. Defaults to 'django_demo_%(num)s'.

DEMO_DATABASE_LIVETIME

Minimum livetime of a database for a user. Must be a datetime.timedelta. Defaults to datetime.timedelta(days=1).

DEMO_FIXTURES

A list of fixtures to load into every empty database to provide things such as users to log in and some initial data to play around with. Defaults to [].

Warning

If you add user accounts with admin rights, make sure they have no rights on apps in DEMO_IGNORE_APPS to prevent security issues.

DEMO_IGNORE_APPS

Apps not to isolate. ‘demo’ and ‘django.contrib.session’ are never isolated, since they need to exist globally. Note that any app you add here poses a security issue, since their data is shared accross all visitors! Defaults to [].

Note

As an additional security measure, django-demo does not register with the admin site if the DemoMiddleware is active.

DEMO_MAX_DATABASES

Maximum amount of databases. Defaults to 0 (infinite).

DEMO_BACKEND

A import path to your custom backend. See Demo Backends. Defaults to the builtin backend for your database engine, if available.

DEMO_ALLOW_SHARE

Allow or disallow sharing of databases using share links. Defaults to True

Warning

Using this setting in combination with a long DATABASE_LIVETIME maybe allow your demo site to be abused as a sharing website, especially if you allow file uploads. Generally this setting should only be enabled if you have a very low DATABASE_LIVETIME.

DEMO_SHARE_PARAMETER

The GET parameter to use for share links. Will only have an effect if DEMO_ALLOW_SHARE is True. Defaults to 'sharedemo'.

DEMO_FILE_STORAGE

The real storage backend to use behind the demo.storage.DemoStorage file storage. Defaults to 'django.core.files.storage.FileSystemStorage'

DEMO_CELERY

Use celery to kill expired databases. This can only be used if 'celery' is in INSTALLED_APPS.

DEMO_DROP_DATABASE

If set to False databases will be flushed instead of dropped whenever a session times out. This can lead to significant performance improvements. Defaults to True for legacy reasons.