Re: Email notification on updates?

2008-10-29 Thread [EMAIL PROTECTED]

Thanks Brian. The Observer in notification doesn't help me (I'd rather
keep my existing observer). The more I look at it, the more
notification looks like a nice piece of work. I just don't know how
much I'll end up reworking it for my purposes.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Email notification on updates?

2008-10-29 Thread Brian Rosner

On Wed, Oct 29, 2008 at 8:26 AM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>
> I have a very simple "watchlist" app which allows people to keep an
> eye on their favorite bits of content on the site... forum topics,
> cars, articles, etc. Not much to it--it simply stores the object and
> who's watching it:
>
> class Watch(models.Model):
>subscriber = models.ForeignKey(User, verbose_name="Subscriber")
>content_type = models.ForeignKey(ContentType)
>content_object = generic.GenericForeignKey()
>object_id = models.IntegerField('object ID')
>
> I've had several requests for email notifications when a watched item
> changes/is updated.
> Initially I thought of django-notification, but I'm having trouble
> getting it running. It appears in its current state of development it
> requires on-site notifications (useless to me) and atomformat???

This is a bit of a wart in django-notification. However, you *should*
be able to use it without hooking things up in the URLconf and it in
theory avoid the atomformat dependancy. If not, I think that should be
fixed. Right now we hit the database on each notification. The on_site
bit should be optional so I am curious as to what you mean it requires
it.

> So I'm not sure if that's the way to go, or if I should just maybe send a
> signal on save from the model(s) they can watch, loop through the
> Watch items that match, and fire off an email to each subscriber.

One thing to point out is that django-notification comes with observer
code that does this all for you. Users can "follow" an object and then
you can trigger the event when something happens. This isn't
documented, but in all likelyhood it will be pulled out of
notification and put in its own app. We have some plans for a bit of
refactoring with your specific use-case in mind.

>
> I'm concerned about scalability, too. Some of these watched items,
> like forum topics, can see a lot of changes.

django-notification will use django-mailer optionally if it is
available. This allows you to offload the email sending overhead to a
background process for processing. We have designed things in
notification to scale pretty well. We even support asynchronous
sending of notifications that can be offloaded to their own background
process for processing as well.

>
> Advice?

If you want more direct feedback, check out the #pinax channel on freenode. :)

-- 
Brian Rosner
http://oebfare.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Email notification on updates?

2008-10-29 Thread [EMAIL PROTECTED]

I have a very simple "watchlist" app which allows people to keep an
eye on their favorite bits of content on the site... forum topics,
cars, articles, etc. Not much to it--it simply stores the object and
who's watching it:

class Watch(models.Model):
subscriber = models.ForeignKey(User, verbose_name="Subscriber")
content_type = models.ForeignKey(ContentType)
content_object = generic.GenericForeignKey()
object_id = models.IntegerField('object ID')

I've had several requests for email notifications when a watched item
changes/is updated.
Initially I thought of django-notification, but I'm having trouble
getting it running. It appears in its current state of development it
requires on-site notifications (useless to me) and atomformat??? So
I'm not sure if that's the way to go, or if I should just maybe send a
signal on save from the model(s) they can watch, loop through the
Watch items that match, and fire off an email to each subscriber.

I'm concerned about scalability, too. Some of these watched items,
like forum topics, can see a lot of changes.

Advice?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---