Skip to main content

Optimistic locking library for Django

Project description

https://secure.travis-ci.org/saxix/django-concurrency.png?branch=develop https://coveralls.io/repos/saxix/django-concurrency/badge.png?branch=develop https://pypip.in/v/django-concurrency/badge.png https://pypip.in/d/django-concurrency/badge.png

django-concurrency is an optimistic locking library for Django.

Tested with: 1.4.8, 1.5.4, 1.6b4, 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.6.tar.gz (32.7 kB view details)

Uploaded Source

File details

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

File metadata

File hashes

Hashes for django-concurrency-0.6.tar.gz
Algorithm Hash digest
SHA256 a2fb03d707e541fffacc92c154e4272f77adef16eb8c22a414acfab341659e07
MD5 2320c3d99d68e77089628b8b5e1c1857
BLAKE2b-256 0ad6378cdd0ab88cbc3a7b0282a552fcb8479afd117c82910dc7eb3b637422e9

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