Optimistic locking library for Django
Project description
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()
Links
Project home page: https://github.com/saxix/django-concurrency
Issue tracker: https://github.com/saxix/django-concurrency/issues?sort
Docs: http://readthedocs.org/docs/django-concurrency/en/latest/
Project details
Release history Release notifications | RSS feed
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.2.tar.gz
(16.3 kB
view details)
File details
Details for the file django-concurrency-0.3.2.tar.gz
.
File metadata
- Download URL: django-concurrency-0.3.2.tar.gz
- Upload date:
- Size: 16.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c7e951da4f9559ded98cee597cf6fde54c4a030c1b8682e95c0efce2007ed39 |
|
MD5 | 8be2891c012a0ad07a849c9099078d75 |
|
BLAKE2b-256 | e02d1d3b1c6b2dbcfab32f0414d1886f6bb986b9a3adeb54bba2c4823bdaf77f |