{"categories":[{"label":"Dynamic Content","url":"https://skillfed.io/packages/category/internet-www-http-dynamic-content/2"}],"enrichment":{"capability":"Adds optimistic locking to Django models to prevent concurrent editing conflicts, raising an error when multiple users try to save conflicting changes to the same record.","skillfed_tags":["django","concurrency-control","data-integrity"],"use_cases":["Prevent data loss when multiple users edit the same Django model instance simultaneously in a web application.","Detect and handle concurrent modifications in Django admin changeists with list-editable fields.","Intercept concurrent changes made outside the Django application (e.g., direct database edits via pgAdmin or phpMyAdmin).","Manage concurrency conflicts in Django admin bulk actions on multiple records.","Implement custom conflict handling logic using ConditionalVersionField for complex business rules."],"what_it_does":"django-concurrency implements optimistic locking for Django models by adding a version field that increments on each save. When two users fetch the same record and both try to save changes, the second save fails with a RecordModifiedError, alerting the application that a conflict occurred. This prevents silent data loss in concurrent editing scenarios.\n\nThe package works by intercepting model saves and comparing the current version field value against what was fetched from the database. It can be applied to any Django model, including those from third-party packages like django.contrib.auth. It handles Django admin list-editable changeists, admin actions, and can even detect changes made outside Django (via database tools) using a TriggerVersionField variant. No runtime dependencies are required beyond Django itself.","worth_installing":"Yes. django-concurrency is actively maintained, has no external dependencies, supports current Django and Python versions, carries an MIT license, and solves a real problem in multi-user Django applications. Install it if your application allows concurrent editing and you need to detect and handle conflicts rather than silently overwriting data."},"id":"django-concurrency","links":{"html":"https://skillfed.io/packages/django-concurrency","md":"https://skillfed.io/packages/django-concurrency.md","pypi":"https://pypi.org/project/django-concurrency/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-04-08","license_spdx":"MIT","license_treatment":"permissive","name":"django-concurrency","python_support":"supports_current","summary":"Optimistic lock implementation for Django. Prevents users from doing concurrent editing"},"popularity":{"monthly_downloads":216547,"position":9375,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"2.8.1"}
