Django-monitor / README.rst

Django-monitor

About

Moderation seems to be some job each one want to do in their own way. Django-monitor is a django-app to moderate model objects. It was started as a clone of django-gatekeeper project but with some different set of requirements.The name monitor is just to distinguish it from an existing project, django-moderation. (The terms, monitor and moderate are used with same meaning everywhere in the source.)

Here, the moderation process is well integrated with django-admin. That is, all moderation actvities are performed from within the changelist page itself.

The detailed documentation is available at http://django-monitor.readthedocs.org/ and in the docs/ directory inside the source path.

Installation

  • Download the latest version from the bitbucket repo: http://bitbucket.org/rajeesh/django-monitor.
  • Copy the monitor directory to some place in your python path.
  • Add to your django project by including 'monitor' in settings.INSTALLED_APPS.

Features

Model-specific permission

Each moderated model will have an associated moderate permission. To approve or challenge any object created for a particular model, users need to have the corresponding permission.

Auto-moderation

Any object created by a user with add permission will have an In Pending status. If the user has got moderate permission also, the object created will automatically get approved (status becomes Approved).

Moderation from within admin changelist

The changelist of a moderated model displays the current moderation status of all objects. Also, you can filter the objects by their moderation status. Three actions are available for moderation. To moderate, user just need to select the objects, choose appropriate action and press Go.

Data protection

The developer can prevent admin-users from changing values of selected fields of approved objects. Deleting approved objects also can be prevented if your client's business requires that.

Basic usage (developers)

  • Register the model for moderation using monitor.nq.

    Example:

    import monitor
    from django.db import models
    class MyModel(models.Model):
        pass
    
    monitor.nq(MyModel)
    
  • Inherit MonitorAdmin, not ModelAdmin for moderated models.

    # in your admin.py
    from monitor.admin import MonitorAdmin
    class MyAdmin(MonitorAdmin):
        pass
    
    from django.contrib import admin
    admin.site.register(MyModel, MyAdmin)
    

More details at http://django-monitor.readthedocs.org. Or check the docs/ directory inside the source path, if you are working offline.

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.