Optimistic lock implementation for Django. Prevents users from doing concurrent editing.
Python
466
714 commits
updated Sep 18, 2026
django-concurrency is an optimistic lock implementation for Django.
It prevents users from doing concurrent editing in Django both from UI and from a django command.
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()
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:
#11313 <https://code.djangoproject.com/ticket/11313>_)Python
97.9%
HTML
1.3%
Optimistic lock implementation for Django. Prevents users from doing concurrent editing.
Python
466
714 commits
updated Sep 18, 2026
django-concurrency is an optimistic lock implementation for Django.
It prevents users from doing concurrent editing in Django both from UI and from a django command.
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()
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:
#11313 <https://code.djangoproject.com/ticket/11313>_)Python
97.9%
HTML
1.3%