Settings

Available 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

ENABLED

Default: True

enable/disable concurrency

CALLBACK

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

Default: concurrency.forms.VersionFieldSigner

Class used to sign the version numbers.

See also

Signining

HANDLER409

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)

MANUAL_TRIGGERS

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

Default: CONCURRENCY_LIST_EDITABLE_POLICY_SILENT

IGNORE_DEFAULT

Default: True

Determines whether a default version number is ignored or used in a concurrency check. While this configuration defaults to True for backwards compatibility, this setting can cause omitted version numbers to pass concurrency checks. New implementations are recommended to set this to False.

Note

For security reasons, starting from version 1.5, default value will be False.

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.