2008/10/12 Alex Koshelev <daeva...@gmail.com>:
>
> There is not way track M2M field change with post_save signal. You can
> write your own derived M2M field class with needed hooks.
>
> On Oct 12, 9:01 pm, Viktor <viktor.n...@gmail.com> wrote:
>> Hi,
>>
>> I have three simple models Project and Member, where Project.member is
>> a ManyToManyField to User through Member
>>
>> then I would like to add some post save action when a new member is
>> added to a project. Should I connect this signal to Project or to
>> Member? Of course, new members can be added on creation and later as
>> well, and I use the generic view create_object for this.
>>
>> I've actually tried both, but with Project instance.members is an
>> "empty" ManyToManyFieldManager, that is instance.members.all() gives
>> [ ] (an empty queryset), while the signal on Member never gets called
>>
>> how would you do this post_save signal?


Is there any example I can read to do the same thing? I want to email
M2M content after an instance save.

I thought a post_save should be raised when M2M field table update is completed.
Is there any way to make a method call after that?



-- 
Alessandro Ronchi
Skype: aronchi
http://www.alessandroronchi.net

SOASI Soc.Coop. - www.soasi.com
Sviluppo Software e Sistemi Open Source
Sede: Via Poggiali 2/bis, 47100 Forlì (FC)
Tel.: +39 0543 798985 - Fax: +39 0543 579928

Rispetta l'ambiente: se non ti è necessario, non stampare questa mail

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to