Russell Keith-Magee wrote:
> temp = Message(...)
> temp.save()
> temp.teams = Team.objects.filter(id__in=data['teams'])
> 
> i.e., there is no need to iterate through the data (which isn't really 
> efficient, since every add is a separate db operation). Instead, you can 
> assign an iterable to a m2m descriptor, using a filtered QuerySet as the 
> iterable. The m2m relation will contain all the members of the iterable.

That's nice, thank you Russ!

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to