saxix/django-concurrency


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

License: MIT

Language: Python

Keywords: concurrency, django, optimistic-locking


Django Concurrency

PyPI package

django-concurrency is an optimistic lock [1]_ implementation for Django.

Supported Django versions: 1.8.x, 1.9.x, 1.10.x., 1.11.x, 2.x

It prevents users from doing concurrent editing in Django both from UI and from a django command.

How it works

sample code:

from django.db import models
from concurrency.fields import IntegerVersionField

class ConcurrentModel( models.Model ):
    version = IntegerVersionField( )
    name = models.CharField(max_length=100)

Now if you try:

a = ConcurrentModel.objects.get(pk=1)
a.name = '1'

b = ConcurrentModel.objects.get(pk=1)
b.name = '2'

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:

Links

Stable master-build master-cov  
Development dev-build dev-cov  
Project home page: https://github.com/saxix/django-concurrency
Issue tracker: https://github.com/saxix/django-concurrency/issues?sort
Download: http://pypi.python.org/pypi/django-concurrency/
Documentation: https://django-concurrency.readthedocs.org/en/latest/

_list-editable: https://django-concurrency.readthedocs.org/en/latest/admin.html#list-editable

Join the chat at https://gitter.im/saxix/django-concurrency

Project Statistics

Sourcerank 8
Repository Size 862 KB
Stars 236
Forks 35
Watchers 6
Open issues 5
Dependencies 17
Contributors 18
Tags 33
Created
Last updated
Last pushed

Top Contributors See all

Stefano Apostolico requires.io tdruez Richard Eames Nikita Sobolev Denis Podlesniy Clayton Daley The Gitter Badger Nicolas Delaby Pirmin Schneider Simon Charette Daniel Hahler mrc75 David Ray BoscoMW Ha Pham Domenico Michael Overmeyer

Packages Referencing this Repo

django-concurrency
Optimistic lock implementation for Django. Prevents users from doing concurrent editing.
Latest release 2.0 - Updated - 236 stars

Recent Tags See all

2.0 March 29, 2019
1.4 May 02, 2017
1.3.2 September 13, 2016
1.3.1 July 15, 2016
1.3 July 15, 2016
1.2 April 05, 2016
1.1 February 13, 2016
1.0.1 December 15, 2015
1.0 December 15, 2015
1.0rc1 December 11, 2015
0.9 April 05, 2015
0.8.1 October 30, 2014
0.8 September 20, 2014
0.7.1 April 27, 2014
0.7 January 04, 2014

Something wrong with this page? Make a suggestion

Last synced: 2019-04-04 16:17:46 UTC

Login to resync this repository