"m2m_changed" signals never gets fired from the admin site
|Reported by:||f3r-_-@…||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Well, dont know if this is a bug or if I've a concept error. But try to test it:
A simple generic test:
from django.dispatch import receiver from django.db.models.signals import m2m_changed @receiver(m2m_changed) def test_handler(sender, instance, action, reverse, model, pk_set, **kwargs): import sys print>>sys.stderr, action
Add this snippet to your code and try to edit a model from the admin that contains a m2m relation. You can add or delete an object to the relationship. Then, you will see that the signal doesn't fire: S
Instead, if you do the same from a shell ... everything works fine.
Could anyone try it and confirm it is not a paranormal activity at my computer?
Thanks in advance.