I set a receiver on a post_save
signal and I was hoping catching the signals for all the proxy of my Model by setting the sender to the main Model but it does not seem to work:
class MyObject(models.Model):
....
class MyObjectProxy(MyObject):
class Meta:
proxy = True
# The receiver
# How to avoid writing another one for sender=MyObjectProxy ?
@receiver(post_save, sender=MyObject)
...
My receiver is not triggered when that happens:
obj = MyObjectProxy()
obj.save()
Is that normal?
I have to set a receiver for each proxy?
Can I set sender
to a list of models?
Thanks.