19

Is there any newsletter app for django, allowing users to subscribe-unsubscribe for newsletters? I'd like to have an app that's easy to use and administered via the Django admin.

6 Answers6

14

you should have a look at this project https://github.com/emencia/emencia-django-newsletter

Stephen Fuhry
  • 12,624
  • 6
  • 56
  • 55
Fernandez Roger
  • 141
  • 1
  • 2
10

You might want to have a look at my app, simply called django-newsletter. It allows for the administration of multiple newsletters, user subscriptions (they don't have to give their email address or confirm anything and uses templates from the database for messages (with support for both text and HTML). The app is currently in production use and a 0.1 release is scheduled within about a week.

For submission of large quantities I would suggest something like Postmark, which can be used with Django as well. (This could be easily used with the newsletter app, as soon as I have moved from using Django's old (SMTP) mail API to the new backend-agnostic one.

But surely, if simple subscription management is all you need you can just use 'github.com slash howiworkdaily slash' django-newsletter which does just that. (And yes, we were first to use that name. :P Sorry about the URL - but apparently stackoverflow uses some kind of ridiculous spam prevention mechanism.)

Mathijs
  • 985
  • 9
  • 8
  • 1
    when I have a large set of subscriptions I cannot open up the add submission screen in admin. – James Lin Feb 20 '13 at 01:18
  • Does the AGPL licence require that you publish the source of your entire Django site if you incorporate this project? – Dan Dyer Dec 03 '13 at 13:03
7

Maybe, maybe not. It wouldn't be too hard to have an app that has a many-to-many association between a Newsletter (however that is imagine) and a Subscriber (foreign key on User or firstName/lastName/emailAddress/password).

Your models would be something like this:

from django.db import models
from django.contrib.auth.models import User

class Subscriber(models.Model):
    user = models.ForeignKey(User)
    email = models.EmailField()

    def __unicode__(self):
        return "User %s" % (self.user.username, )

    @models.permalink
    def get_absolute_url(self):
        return ('subscriber', None, {'object_id' : self.id})

    class Meta:
        ordering = [ "id" ]

class Newsletter(models.Model):
    name = models.CharField(max_length=80)
    subscribers = models.ManyToManyField('Subscriber')
    # .... Other stuff

    def __unicode__(self):
        return "Newsletter %s" % (self.name, )

    @models.permalink
    def get_absolute_url(self):
        return ('newsletter', None, {'object_id' : self.id})

    class Meta:
        ordering = [ "id" ]

Your urls.py would be something like this:

from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template

urlpatterns = patterns('',
    url(r'^subscriber/(?P<object_id>\d+)/$', views.subscriberview, name='subscriber_view'),
    url(r'^newsletter/(?P<object_id>\d+)/$'', views.newsletterview,name='newsletter_view'),
    url(r'^site_media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': MEDIA_ROOT}),
)

Is that enough to get you going?

hughdbrown
  • 47,733
  • 20
  • 85
  • 108
2

I have published a screencast demo of Emencia Django Newsletter if you want have a look http://www.emencia.fr/fr/solutions/newsletter/emencia-django-newsletter

It is of course open source on available on github

We need contribution on translation also on transifex

user563661
  • 21
  • 1
1

I've decided to create my own solution for assembling the text and handling subscriptions, but I think I'm going to use django-mailer to keep track of what was sent and how did it end up.

che
  • 12,097
  • 7
  • 42
  • 71
0

Try djangolist

DjangoList is a django app that will allow doing mass mailings and manage newsletter from which users can subscribe/unsubscribe. DjangoList is currently under development and is not ready to use.

Alexandr
  • 381
  • 1
  • 5
  • 13