Code Monkey home page Code Monkey logo

djangocms-concurrent-users's Introduction

djangocms-concurrent-users

A Django-CMS plugin for blocking pages which are edited by another user. This provides a simple mechanism to prevent two users working on the same page. Due to the fact, that only the version of the last user hitting the save button is stored, data loss is very likely.

This plugin adds a hidden toolbar item in order to provide the required code to the client. Once the browser enters a page, it checks for another user and gets blocked in case the page has been locked. If the page is not edited at this moment, the client acquires a lock and hence blocks it for other users for the time of working. The check if performed by polling the server with an specified interval. Once the client lefts the page, the lock is released and the next user will be able to make changes.

Features

  • blocks a page with an overlay in case another user is already working on it
  • reloads the page once it is released, in order to fetch the latest changes
  • displays the username and time of the blocking user

Installation

To get started using djangocms-concurrent-users:

  • install it with pip:

    $ pip install djangocms-concurrent-users
  • add the plugins to INSTALLED_APPS:

    INSTALLED_APPS = (
        ...
        'djangocms_concurrent_users',
        ...
    )
  • run migrate.
  • add url(r'', include('djangocms_concurrent_users.urls', namespace='concurrent_users'), ), to your urls

Configuration

  • CONCURRENT_BLOCKING_OFFSET: Time to wait until the page is release just after the user left; is 20 by default; Must not be shorter than CONCURRENT_POLLING_INTERVAL
  • CONCURRENT_POLLING_INTERVAL: Interval for the clients to poll the server; is 20 by default; Must not be greater than CONCURRENT_BLOCKING_OFFSET
  • CONCURRENT_BLOCK_EDITING: Specifies if the blocking actually happens; is True by default;

djangocms-concurrent-users's People

Contributors

madwau avatar mammuth avatar schille avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.