Django Bayesian inference based comment moderation app.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Django Moderator

Django community trained Bayesian inference based comment moderation app.

django-moderator integrates Django's comments framework classify comments into one of four categories, ham, spam, reported or unsure.

Users classify comments as reported using a report abuse mechanic. Staff users can then classify these reported comments as ham or spam.

Comments classified as spam will have their is_removed field set to True and as such will no longer be visible in comment listings.

Comments reported by users will have their is_removed field set to True and as such will no longer be visible in comment listings.

Comments classified as ham or unsure will remain unchanged and as such will be visible in comment listings.

django-moderator also implements a user friendly admin interface for efficiently moderating comments.


  1. Install or add django-moderator to your Python path.

  2. Add moderator to your INSTALLED_APPS setting.

  3. Configure django-likes as described here.

  4. Configure django-celery and add moderator.tasks to the CELERY_IMPORTS = (..., 'moderator.tasks')

  5. Add a MODERATOR setting to your project's file. This setting specifies what classifier storage backend to use (see below) and also classification thresholds:

        'ABUSE_CUTOFF': 3,

    ABUSE_CUTOFF` value of 3 as in this example specifies that any comment receiving 3 or more abuse reports will be classified as reported, awaiting further manual staff user classification.

  6. Optionally, if you want an additional moderate object tool on admin change views, configure django-apptemplates as described here , include moderator as an INSTALLED_APP before django.contrib.admin and add moderator.admin.AdminModeratorMixin as a base class to those admin classes you want the tool available for.

Additional Settings

  1. By default moderator comment replies are posted chronologically after the comment being replied to. If however you need replies to be posted before the comment being replied to(for example if you display your comments reverse cronologically), you can specify REPLY_BEFORE_COMMENT as True, i.e.: