Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Simple integration of the IntenseDebate comment widget for Django projects.

Project Description

A simple integration of the IntenseDebate comment widget for Django projects.

Requirements

  • Python 2.5+
  • Django 1.4+

Installation

  1. Install the latest stable version using pip:

    pip install django-intensedebate
    
  2. Add intensedebate to your INSTALLED_APPS setting:

    INSTALLED_APPS = (
        ...
        'intensedebate',
    )
    

Configuration

The intensedebate_config template tag requires a site account number. Either pass it as intensedebate_acct, or set INTENSEDEBATE_ACCT in your settings:

INTENSEDEBATE_ACCT = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

The site account number can be found by visiting the Site Key page (IntenseDebate site acct:).

Basic Usage

  1. Load the tag library:

    {% load intensedebate %}
    
  2. Create a container (see container_id) in your html body to display the widget:

    <div id="intensedebate"></div>
    
  3. Load the widget:

    {% intensedebate_load %}
    

    You can pass these options as arguments:

    Option Default Description
    intensedebate_acct   Site account number (see configuration above).
    post_id * window.location.href; Unique identifier of the post. This is what keeps the comments set on this post different than comments set on another post. The default value is the URL of the page.
    post_id_prefix   post_id prefix.
    post_id_suffix   post_id suffix.
    post_url window.location.href; URL of the post. This is the URL IntenseDebate will link to in RSS feeds and on intensedebate.com.
    post_title document.title; Title of the post. This is the title that will be displayed in RSS feeds and on intensedebate.com.
    container_id   The container to display the widget. Warning: If not defined, IntenseDebate will create a container id="idc-container-parent" above the intensedebate_load template tag.
    • post_id ensures the correct comments are associated with the correct post. It should be unique, e.g object.id (to avoid conflict with other id’s, use post_id_prefix and post_id_suffix).

Example

{% load intensedebate %}


<!DOCTYPE HTML>

<html>

<head>
  <meta charset="utf-8">
  <title>django-intensedebate Example</title>
</head>

<body>
  <p>Well, the way they make shows is, they make one show. That show's
  called a pilot. Then they show that show to the people who make shows,
  and on the strength of that one show they decide if they're going to
  make more shows. Some pilots get picked and become television programs.
  Some don't, become nothing. She starred in one of the ones that became
  nothing.</p>

  <div id="intensedebate"></div>

  <!-- Placed at the end of the document so the page loads faster -->
  {% intensedebate_load post_id=object.id post_id_prefix='pid_' container_id='intensedebate' %}
</body>

</html>
Release History

Release History

This version
History Node

1.0.0

History Node

0.7.0

History Node

0.6.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-intensedebate-1.0.0.tar.gz (17.8 kB) Copy SHA256 Checksum SHA256 Source Jul 23, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting