skip to navigation
skip to content

Not Logged In

django-concurrency 0.7.1

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

https://pypip.in/v/django-concurrency/badge.png https://pypip.in/d/django-concurrency/badge.png

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

Tested with: 1.4.x, 1.5.x, 1.6.x, 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)
a.save()
b.save()

you will get a RecordModifiedError on b.save()

 
File Type Py Version Uploaded on Size
django-concurrency-0.7.1.tar.gz (md5) Source 2014-01-15 19KB
  • Downloads (All Versions):
  • 41 downloads in the last day
  • 275 downloads in the last week
  • 1055 downloads in the last month