skip to navigation
skip to content

django-concurrency 1.0c1

Optimistic lock implementation for Django. Prevents users from doing concurrent editing.

django-concurrency is an optimistic lock [1] implementation for Django.

Supported Django versions: 1.7.x 1.8.x, 1.9rc1.

It prevents users from doing concurrent editing in Django both from UI and from a django command.

How it works

sample code:

from django.db import models
from concurrency.fields import IntegerVersionField

class ConcurrentModel( models.Model ):
    version = IntegerVersionField( )
    name = models.CharField(max_length=100)

Now if you try:

a = ConcurrentModel.objects.get(pk=1) = '1'

b = ConcurrentModel.objects.get(pk=1) = '2'

you will get a RecordModifiedError on

Similar projects

Other projects that handle concurrent editing are django-optimistic-lock and django-locking anyway concurrency is “a batteries included” optimistic lock management system, here some features not available elsewhere:

  • can be applied to any model; not only your code (ie. django.contrib.auth.Group)
  • handle list-editable ChangeList. (handle #11313)
  • manage concurrency conflicts in admin’s actions
  • can intercept changes performend out of the django app (ie using pgAdmin, phpMyAdmin, Toads) (using TriggerVersionField)
  • can be disabled if needed (see disable_concurrency)
File Type Py Version Uploaded on Size
django-concurrency-1.0c1.tar.gz (md5) Source 2015-11-21 21KB
  • Downloads (All Versions):
  • 96 downloads in the last day
  • 1014 downloads in the last week
  • 3355 downloads in the last month