skip to navigation
skip to content

Not Logged In

django-concurrency 0.9

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.x 1.8.x.

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-1.8
  • 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.9.tar.gz (md5) Source 2015-04-05 21KB
  • Downloads (All Versions):
  • 113 downloads in the last day
  • 502 downloads in the last week
  • 2277 downloads in the last month