Skip to content
Prevents users from doing concurrent editing in Django. Works out of the box in the admin interface, or you can integrate it with your own apps using a public API.
Python JavaScript CSS Shell
Find file
Pull request Compare This branch is 29 commits ahead, 4 commits behind souen:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



About this fork

Far more intrusive, this fork aims to be lighter and to do less HTTP and DB requests: - Locking is no longer done through AJAX, it's done directly in - JavaScript vars are exported through a template tag, and not through a JS call to a dynamic view. - Views are included directly in LockableAdmin (through get_url()), there is no longer need for custom decorators (to perform permission checks) nor utils (to fetch lockable models...)


  • Add locking to your INSTALLED_APPS.

  • Specify settings #FIXME

  • Static files

  • For any model that requires locking:
    • Specify locking.models.LockableModel as a model base class.
    • Specify locking.admin.LockableAdmin as a ModelAdmin base class.
    • Specify locking.forms.LockableForm as a base class of the ModelAdmin.form.
    • Add original_locked_at and original_modified_at to ModelAdmin.fields.
  • Call {% locking_variables %} in the change_form.html (or in a parent), before any call to locking JS scripts.

Something went wrong with that request. Please try again.