Ticket #11278: assign-related-objects.diff

File assign-related-objects.diff, 551 bytes (added by Jarek Zgoda, 15 years ago)

patch for documentation on assigning iterable of PK's instead of model instances

  • docs/topics/db/queries.txt

    945945    Removes all objects from the related object set.
    947947To assign the members of a related set in one fell swoop, just assign to it
    948 from any iterable object. Example::
     948from any iterable object. The members may be model instances or related primary
     949key values. Example::
    950951    b = Blog.objects.get(id=1)
    951952    b.entry_set = [e1, e2]
Back to Top