i have an model

class People(models.Model):
     friends = models.ManyToManyField(User, blank=True)

and i use m2m_changed signal

m2m_changed.connect(m2m_people_handle, People.friends.through)

and the m2m_people_handle function is

def m2m_people_handle(sender, instance, action, reverse, model,
pk_set, **kwargs):
    if action == 'post_add':
        print len(pk_set)

when i tested in some where:  people.friends.add(user)

the m2m_people_handle function print len(pk_set) result is 0

what wrong with it?

thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
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.

Reply via email to