Skip to main content

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

Project description

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()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-concurrency-0.7.tar.gz (20.0 kB view details)

Uploaded Source

File details

Details for the file django-concurrency-0.7.tar.gz.

File metadata

File hashes

Hashes for django-concurrency-0.7.tar.gz
Algorithm Hash digest
SHA256 a6d3ef4554477c9207f703b39a52b5eea746a288993d0c33e1e0218bd6e8714f
MD5 3ac36e2440d4cbc8210e44a895eaa714
BLAKE2b-256 0f001bb92c34194ef298e96c00433f9eb03cd1332668d141da5ec485f7ef7d1a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page