On 18/08/10 07:48, Kenneth Gonsalves wrote: > hi, > > 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") Not all the docs mention dispatch_uid, which doesn't help, it's mentioned here: http://code.djangoproject.com/wiki/Signals#Helppost_saveseemstobeemittedtwiceforeachsave -- 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.