Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/runekaagaard/django-admin-locking

A Django application that prevents data loss with a focus on contrib.admin.
https://github.com/runekaagaard/django-admin-locking

Last synced: 11 days ago
JSON representation

A Django application that prevents data loss with a focus on contrib.admin.

Awesome Lists containing this project

README

        

About
=====

Out of the box the Django administration does not protect its users from the
hazards of concurrent editing. django-admin-locking does the following:

- Locks the content in the admin.
- Prevents saving of stale data. This can happen if user A opens a page, user
B opens a page, saves and navigates away from the page and user A now saves
the page.
- Is helpful towards the users.
- Has a super simple API for use in other apps.

Installation
============

- Add 'admin_locking' to "INSTALLED_APPS" in "settings.py".
- Add the following to "urls.py"::

(r'^admin_locking/', include('admin_locking.urls')),

- Make all your modeladmins extend "LockingAdmin"::

from admin_locking.admin import LockingAdmin
class MyModelAdmin(LockingAdmin):
pass

Setttings
=========

The following settings are available::

ADMIN_LOCKING = {
# The number of seconds until a lock is lifted.
'lock_duration': 60 * 60,
}

API
===

Can be found here: https://github.com/runekaagaard/django-admin-locking/blob/master/admin_locking/api.py.