Re: how to properly use the m2m_changed signal?

2013-06-28 Thread Roberto López López
Changing the m2m_changed signal on Project.departments.through to post_save on ProjectDepartmentMembership did the trick. m2m_changed signal seems to work as long as you don't explicitly define the "through" model. On 06/28/2013 02:06 PM, Roberto López López wrote: > > I am doing tests and

Re: how to properly use the m2m_changed signal?

2013-06-28 Thread Roberto López López
I am doing tests and the m2m_changed signal seems to work perfectly as long as I have not defined a "through" model. Is there any trick here? Thanks! On 06/28/2013 12:14 PM, Roberto López López wrote: > > I have tried as well using the post_save signal and overriding the > save() method. But

Re: how to properly use the m2m_changed signal?

2013-06-28 Thread Roberto López López
I have tried as well using the post_save signal and overriding the save() method. But in none of those cases Project.departments is populated yet when reaching my code :-/ On 06/28/2013 11:50 AM, Roberto López López wrote: > > Hi, > > I am trying to listen to the m2m_changed signal on my

how to properly use the m2m_changed signal?

2013-06-28 Thread Roberto López López
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): departments = models.ManyToManyField('department.Department', related_name='projects',