Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

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.

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 docs
Octocat-spinner-32 locking
Octocat-spinner-32 test_proj
Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.rst
Octocat-spinner-32 setup.py
README.rst

WARNING: WORK IN PROGRESS

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 admin.py - 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...)

Installation

  • 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.