#11278 closed (fixed)
Docs do not mention mod.m2m = [list, of, PKs]
Description ¶
The docs don't mention that it's possible to bulk assign to an m2m relationship using a list of primary key values.
mod.m2m = [pk1, pk2, pk3]
The docs do mention being able to do this with a list of models:
http://docs.djangoproject.com/en/dev/topics/db/queries/#following-relationships-backward
Change History (7)
by , 16 years ago
Attachment: | assign-related-objects.diff added |
---|
comment:2 by , 16 years ago
Triage Stage: | Unreviewed → Ready for checkin |
---|
comment:3 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 by , 16 years ago
Note:
See TracTickets
for help on using tickets.
patch for documentation on assigning iterable of PK's instead of model instances