On Wed, 2010-08-18 at 12:00 +0100, David De La Harpe Golden wrote:
> > I am using a two post_save signal handlers for two different models.
> On
> > certain conditions they have to send emails to me and others. At
> times
> > one signal is generated, at other times two or even in one instance
> 4
> > signals were generated, which results in duplicate and triplicate
> > emails. Has anyone faced this problem?
> 
> 
> Just in case - you have set a dispatch_uid during signal connection
> so they're only registered once?
> 
> You probably have your signal connections at module scope
> (e.g. we tend to do them in apps' __init__.py to make sure they're
> connected early), and you don't dispatch_uid them, you'll find that
> just
> by virtue of double imports and whatnot sometimes you get duplicate
> registrations which cause them to fire twice.
> 
> signals.post_save.connect(_do_thingy, sender=Blah,
> dispatch_uid="mymodule") 

yes - actually there was a double import - I removed it and also added
despatch_uid - looks like the problem is solved
-- 
regards
Kenneth Gonsalves

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

Reply via email to