Hi,
I am trying to listen to the m2m_changed signal on my models, but I can't make it work. Even the execution flow does not reach the linked method!
class Project(models.Model):As interface I am using the django admin, and departments appears as an inline of Project
departments = models.ManyToManyField('department.Department', related_name='projects',
through='project.ProjectDepartmentMembership')
@receiver(m2m_changed, sender=Project.departments.through)
def _on_change_m2m(sender, instance, action, reverse, model, pk_set, using, **kwargs):
pass
Any help please? Thanks.
Cheers,
Roberto
No comments:
Post a Comment