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

Simple newsletter application for Django framework.

Project Description

Informant is simple yet flexible app for common newsletter-sending functionality which lot of sites need to offer. It only provides one common newsletter with opt-in/opt-out and features management command for mail sending (HTML/text alternative).


Standard Django way:

pip install django-informant



Set e-mail address to set newsletters from in your




Informant provides few default templates to start with but it’s usually better to make your own - customized. These are:

  • informant/management/subscribe_ok.html - template to render when subscription is OK
  • informant/management/subscribe_error.html - template to render when there was an error
  • informant/management/unsubscribed.html - template to render when user has unsubscribed
  • informant/mail/newsletter.html - base template with e-mail structure
  • informant/mail/base.txt - text alternative that should point out to the web version of the newsletter

Informant uses newsletter text as Django template. It’s therefore usefull to create basic blocks in informant/mail/newsletter.html and then extend from it in the newsletter administration and override only specific block like you would do in real templates. E.g.:

In informant/mail/newsletter.html:

{% load i18n %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="" xml:lang="{% trans "lang" %}" lang="{% trans "lang" %}">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>{% block head %}{% endblock %}</title>
{% block content %}{% endblock %}

In Newsletter object content field:

{% extends "informant/mail/newsletter.html" %}
{% block title %}My title{% endblock %}
{% block content %}My content{% endblock %}

Ajax subscription

If you don’t want separate page with subscription form, Informant has a jQuery plugin which will take care.

It is called on the <form> elements. It expects that form has correctly set up the action attribute pointing to the right URL. See example:

<form id="newsletterSubscribeForm" action="{% url "informant_subscribe" %}" method="post">
        <label for="email">Enter your e-mail:</label>
        <div id="newsletterSubscribeResult"></div>
        {% csrf_token %}
        <input type="email" name="email" />
        <input type="hidden" name="surname" value="" />
        <input type="submit" value="Subscribe" class="button" />

<script type="text/javascript">
    // JavaScript handler
    var subscribeForm = $('#newsletterSubscribeForm');
        renderResults: true,
        resultContainer: $('#newsletterSubscribeResult')
    subscribeForm.bind('informantSubscribeOk', function () {

The Javascript plugin by default doesn’t render any results. If you want it to, supply configuration as seen above. Plugin will fire informantSubscribeOk and informantSubscribeError events in case of successfull or invalid subscription respectively. You can bind to these using jQuery’s .bind() method.


Informant provides send_newsletter command that will send newsletters using the email backend from your Django settings.

Release History

This version
History Node


History Node


History Node


History Node


History Node


Download Files

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

File Name & Hash SHA256 Hash Help Version File Type Upload Date
(11.3 kB) Copy SHA256 Hash SHA256
Source Apr 26, 2013

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