tags:

views:

23

answers:

1

I have been trying to search for the right way to go about creating a "subscribe to comments feeds" with an email subscription, seen on many blog. I have got an RSS feed working, but would prefer to use a cleaner email subscription.

What is the right way to go about this. Should I create a new class in the models.py file to create new database tables to handle it, or is it better to use third party applications? I prefer to keep from using things like Intense Debate. I want to keep it Django as much as possible.

I am assuming that this is already available in Django?

Basically, I want to create something like the "Notify .... daily of new answers" bit at the bottom of this page as I write this question.

Edit: I wonder if I should be trying to use signals to do this with?

+1  A: 

You might want to use the django-notification app. It's a nice reusable application that let you define events that will trigger specific notifications and you can specify how the notification will be sent, e.g. by mail in your example.

But this is maybe not what you want since there is no way to send only one email per day with all the new posts created.

So my suggestion is:

  • Create a new simple app that stores the subscribers with their details about how often they want to receive updates etc.
  • Then create a management command that sends emails of new posts and dependent of the settings of your subscribers.
  • Make a cronjob (or use celery) to trigger this view every day.
Gregor Müllegger
Thank you so much for the reply. I eventually just decided to cop-out (I also didn't want to keep waisting time) and just used a third party application. But I'll remember this for the future.
Vernon