Skip to main content

Optimistic locking library for Django

Project description

https://secure.travis-ci.org/saxix/django-concurrency.png?branch=master

django-concurrency is a optimistic locking library for Django 1.4.

It works adding a VersionField to the model, each time a model is successfully saved the VersionNumber is incremented.

How it works

sample code:

from concurrency.fields import IntegerVersionField

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

Now if if you try:

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

you will get a RecordModifedError 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.3.1.tar.gz (16.4 kB view details)

Uploaded Source

File details

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

File metadata

File hashes

Hashes for django-concurrency-0.3.1.tar.gz
Algorithm Hash digest
SHA256 4ea038ba39ea45c7ec5b49a44160fbbf0f683f404217ce97c940bf5400485219
MD5 ac0124081f62797c4c7b79e926ab4054
BLAKE2b-256 0e7e6185e3682d0e886c80ce17aa7115579b2fb943ba1a9c667a7f6b5aa6366b

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