skip to navigation
skip to content

Not Logged In

django-concurrency 0.8.1

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

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

Tested with: 1.4.x, 1.5.x, 1.6.x, 1.7 trunk.

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

How it works

sample code:

from concurrency.fields import IntegerVersionField

class ConcurrentModel( models.Model ):
    version = IntegerVersionField( )

Now if you try:

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

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)
  • works with django 1.4 and 1.5
  • 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_
File Type Py Version Uploaded on Size
django-concurrency-0.8.1.tar.gz (md5) Source 2014-10-30 20KB
  • Downloads (All Versions):
  • 38 downloads in the last day
  • 329 downloads in the last week
  • 422 downloads in the last month