hi, trying to work around bug #3951 (http://code.djangoproject.com/ticket/3951), I've found two possible approaches which both seem to solve my problem (I send a notification mail in response to the signal and I don't want the mail to be sent twice).
The first approach would be to add a flag to the instance: def signal_handler(sender, instance, **kwargs): if hasattr(instance, 'my_secret_flag'): return # normal signal handler follows here # ... instance.my_secret_flag = True The second, and possibly more elegant solution would be to compare __name__ against the full module path (as I understand it, #3951 is caused by importing the module once with an absolute path and once with a relative one): if __name__ == 'myproject.myapp': dispatcher.connect(signal_handler, ...) Both approaches seem to work fine (in the local test server), however since I am neither an experienced python nor django programmer, I'd welcome any opinions from more seasoned programmers about the possible up- and downsides (or even unintended side-effects) of these two approaches. thanks, chris --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---