| Issue 8: | E-Mail Notifications / Thread Subscription | |
| 1 person starred this issue and may be notified of changes. | Back to list |
One feature I was thinking this needs is email/sms notification. So you get a message when someone responds to a message/post you wrote or thread you started. By default you would get it and have the option to opt-out on anything as well. I might give this a whirl and see how far I get, let me know if you would also like this feature or have other input.
Dec 10, 2007
There could be a "subscribe" or "notify" checkbox near each "Create Post" textarea. The the app would look at the user and the thread to determine if you are subscribed and check the box appropriately, if you uncheck it and post then you are unsubscribed. Or I could create a separate section with a user's "settings" on a thread? Any examples you already have in mind?
Dec 10, 2007
How about a quick model (paraphrased)
class Subscription:
user = ForeignKey(User)
thread = ForeignKey(Thread)
When displaying the 'Create Post' textarea, add a 'Subscribe to this thread'
checkbox. If the user is already subscribed, have it pre-checked. If they're not
subscribed, leave it unchecked.
We then need a view to enable a user to see their current subscriptions, with an easy
way to opt out. Perhaps a list of threads with title, last post date, last post user,
'Unsubscribe' link.
Dec 10, 2007
We could add that checkbox in a column on the thread_list view like 'Subscribed'? Re: view to enable a user to see their current subscriptions I was planning on doing that in my user's profile (separate app).
Dec 10, 2007
I think a dedicated "Subscriptions" view is required so a user can quickly see what they are subscribed to and unsubscribe immediately. Also, an email signature with two links would be useful: 1) Unsubscribe from this thread 2) Unsubscribe from all threads With no confirmation - just plain unsubscribe. I don't see this as a user profile-related issue; the profile is for stuff such as "Date of Birth", "Dogs Name" and "Home Town". Subscriptions are a forum-specific task, and should be part of a forum application rather than a profile application (otherwise, you're implying two-way dependency. Yuck!)
Dec 11, 2007
Gotcha.
Feb 9, 2008
Ok, here's the first whack at a patch. Let me know what you think.
Feb 9, 2008
I forgot to try the BCC header, let me do that now.
Feb 9, 2008
just found django.core.mail.send_mass_mail()
Feb 9, 2008
Fantastic contribution mandric! If I can make a few minor suggestions: * Using fail_silently=True means the whole thing won't bomb out on a dodgy e-mail address * I would also like to see the e-mail message abstracted out to a template to prevent the text being hard-coded within the view file. * It appears as if send_mass_mail() itself is deprecated, however it's only 3 lines long. Perhaps just using EmailMessage() directly with BCC is a simple straightforward way to go? * In the message template we should add a) a link to the thread, and b) a link to the subscription view. If I find time later today I'll merge in your code and then try to make these changes I've listed... although there's a good chance you'll get to it first :) Again, fantastic work and thanks for the contribution!
Status:
Started
Feb 9, 2008
Actually already working with EmailMessage ... saw the BCC option. But for some reason it didn't work. (debugging) As far as the rest, sounds good ... I'll get to it.
Feb 9, 2008
This helps ;) http://www.rossp.org/blog/2006/jul/11/sending-e-mails-templates/
Feb 9, 2008
* Email still has html encoded chars in it. like quotes. * Update Subscriptions link in the thread seems out of place. Would be nice to have another form on that page to just update that sub. * Updated HttpResponse calls to use return instead of raise since they're not Errors. * Added email template and using link to thread in email. * Using EmailMessage, BCC and fail_silently=True
Feb 10, 2008
Were you thinking people could unsubscribe without logging in? We could add some random string to each subscription that gets passed in the email sig so people don't need to bother to login to unsubscribe from a thread. I like that idea. That would also take care of the where to put a 'update subscriptions' link in the thread template. It wouldn't be necessary. We could just have one link to that update subscriptions view.
Feb 11, 2008
minor update
Feb 15, 2008
This one isn't part of the sub feature but just thought I'd past it here. I ran into a conflice when I also installed django-basic-blog which also uses a Post class. So User.post_set.all() had a conflict. minor. 175a176,184 > @@ -169,7 +169,7 @@ > method also updates models further up the heirarchy (Thread,Forum) > """ > thread = models.ForeignKey(Thread) > - author = models.ForeignKey(User) > + author = models.ForeignKey(User, related_name="forum_post_set") > body = models.TextField() > time = models.DateTimeField(blank=True, null=True) >
Apr 14, 2008
Committed to latest SVN. Thank you for your fantastic contribution!
Status:
Fixed
|
Status: Accepted
Labels: -Type-Defect Type-Enhancement