Settings

Here’s a full list of all available settings, in alphabetical order, and their default values.

Note

Each entry MUST have the prefix CONCURRENCY_ when used in your settings.py

AUTO_CREATE_TRIGGERS

New in version 2.3.

Default: True

If true automatically create triggers. To manually create triggers set CONCURRENCY_AUTO_CREATE_TRIGGERS=False and use triggers management command management command or create them manually using your DB client.

Note:: This flag deprecates MANUAL_TRIGGERS

ENABLED

New in version 0.10.

Default: True

enable/disable concurrency

CALLBACK

Changed in version 0.7.

Default: concurrency.views.callback

Handler invoked when a conflict is raised. The default implementation simply raise RecordModifiedError

Can be used to display the two version of the record and let the user to force the update or merge the values.

FIELD_SIGNER

New in version 0.5.

Default: concurrency.forms.VersionFieldSigner

Class used to sign the version numbers.

See also

Signining

HANDLER409

New in version 0.6.

Default: concurrency.views.conflict

Handler to intercept RecordModifiedError into ConcurrencyMiddleware. The default implementation (concurrency.views.conflict) renders 409.html while passing into the context the object that is going to be saved (target)

IGNORE_DEFAULT

New in version 1.2.

Changed in version 1.5.

Default: True

See also

VERSION_FIELD_REQUIRED

VERSION_FIELD_REQUIRED

New in version 1.5.

Default: True

Determines whether version number is mandatory in any save operation. Setting this flag to False can cause omitted version numbers to pass concurrency checks.

MANUAL_TRIGGERS

New in version 1.0.

Deprecated since version 2.3.

Default: False

If false do not automatically create triggers, you can create them using triggers management command

management command or manually using your DB client.

POLICY

Changed in version 0.7.

Default: CONCURRENCY_LIST_EDITABLE_POLICY_SILENT

CONCURRENCY_LIST_EDITABLE_POLICY_SILENT

Used by admin’s integrations to handle list_editable conflicts. Do not save conflicting records, continue and save all non-conflicting records, show a message to the user

CONCURRENCY_LIST_EDITABLE_POLICY_ABORT_ALL

Used by admin’s integations to handle list_editable. Stop at the first conflict and raise RecordModifiedError. Note that if you want to use ConcurrencyMiddleware based conflict management you must set this flag.

TRIGGERS_FACTORY

New in version 2.3.

Default:

{'postgresql': "concurrency.triggers.PostgreSQL",
 'mysql': "concurrency.triggers.MySQL",
 'sqlite3': "concurrency.triggers.Sqlite3",
 'sqlite': "concurrency.triggers.Sqlite3",
 }

dict to customise TriggerFactory. Use this to customise the SQL clause to create triggers.