Optimistic lock implementation for Django. Prevents users from doing concurrent editing.
Project description
django-concurrency is an optimistic lock [1] implementation for Django.
Tested with: 1.4.x, 1.5.x, 1.6.x, 1.7 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()
Similar projects
Other projects that handle concurrent editing are django-optimistic-lock and django-locking anyway concurrency is “a batteries included” optimistic lock management system, here some features not available elsewhere:
can be applied to any model; not only your code (ie. django.contrib.auth.Group)
works with django 1.4 and 1.5
handle list-editable ChangeList. (handle #11313)
manage concurrency conflicts in admin’s actions
can intercept changes performend out of the django app (ie using pgAdmin, phpMyAdmin, Toads) (using TriggerVersionField_
Links
Stable |
|||||
Development |
|||||
Project home page: |
|||||
Issue tracker: |
|||||
Download: |
|||||
Documentation: |
_list-editable: https://django-concurrency.readthedocs.org/en/latest/admin.html#list-editable
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
File details
Details for the file django-concurrency-0.8.tar.gz
.
File metadata
- Download URL: django-concurrency-0.8.tar.gz
- Upload date:
- Size: 20.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b89605f7d423ba7361d43c0a5d7f193c92601b9706af3ea6251f326db1a8614e |
|
MD5 | 3720733849d96d979d834d92b1a5663f |
|
BLAKE2b-256 | 5b4764100258609b09ae96ff1d303414a89dfb53d505eaa03b5e579cb2d6381c |