Skip to content


Subversion checkout URL

You can clone with
Download ZIP
An email newsletter application for the Django web application framework, including an extended admin interface, web (un)subscription, dynamic e-mail templates, an archive and HTML email support.
Python HTML JavaScript

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.



Newsletter application for the Django web framework.

What is it?

Django app for managing multiple mass-mailing lists with both plaintext as well as HTML templates (and TinyMCE editor for HTML messages), images and a smart queueing system all right from the admin interface.


We are currently using this package in several production environments, but it should still be considered a work in progress.


Most of the strings have been translated to Dutch and a German translation should be available soon. Feel free to contribute any translations through Transifex.


Please refer to requirements.txt for an updated list of required packes.


  1. Get it from the Cheese Shop:

    pip install django-newsletter

    Or get the latest & greatest from Github and link it to your application tree:

    pip install -e git://

    (In either case it is recommended that you use VirtualEnv in order to keep your Python environment somewhat clean.)

  2. Add newsletter and to INSTALLED_APPS in and make sure that the dependencies django-tinymce and django-extensions are there as well:

  3. Import subscription, unsubscription and archive URL's somewhere in your

    urlpatterns = patterns('',
        (r'^newsletter/', include('newsletter.urls')),
  4. Make the media dir available as {{ MEDIA_URL }}newsletter/ and do the same for the django-tinymce app.

    Preferably use something like django-staticmedia to manage the media files for your installed apps so you won't have to worry about this. You can simply pip install django-staticmedia and add the following to to make everything accessible in the development server:

    import staticmedia
    urlpatterns += staticmedia.serve()
  5. Configure TinyMCE if you have not already done so. At the very least make sure you set TINYMCE_JS_URL in to point to wherever tiny_mce.js is located. (Typically /media/tinymce/tiny_mce/tiny_mce.js)

  6. Create required data structure and load default template fixture:

    ./ syncdb
    ./ loaddata default_templates
  7. Change the default contact email listed in templates/newsletter/subscription_subscribe.html and templates/newsletter/subscription_update.html.

  8. Run the tests to see if it all works:

    ./ test

    If this fails, please contact me! If it doesn't: that's a good sign, chap. You'll probably have yourself a working configuration!

  9. Add jobs for sending out mail queues to crontab:

    @hourly /path/to/my/project/ runjobs hourly
    @daily /path/to/my/project/ runjobs daily
    @weekly /path/to/my/project/ runjobs weekly
    @monthly /path/to/my/project/ runjobs monthly


  1. Start the development server: ./ runserver
  2. Navigate to /admin/ and: behold!
  3. Put a submission in the queue.
  4. Submit your message with ./ runjob submit
  5. For a proper understanding, please take a look at the model graph.

Unit tests

Fairly extensive tests are available for internal frameworks, web (un)subscription and mail sending. One feature currently untested is actually sending mail to very large numbers of recipients (1000+), but feel free to try around. Please to note that the unittests (or actually, Django) currently requires a 404.html in your templates directory in order to be able to test 404 responses.


  • Add a separate submission queue view in the admin instead of the modded edit view, which is confusing to the user.
  • Finish front end for article ordering from admin.
  • Write tests for: template syntax checking, ordering of articles in a message.
  • Extend subscription models to allow for mail deliverability feedback.
  • Refactor default contact email out of the templates.


This application is released under the GNU Affero General Public License version 3.

Something went wrong with that request. Please try again.