From 71ada3a8e689a883b5ffdeb1744ea16f176ab730 Mon Sep 17 00:00:00 2001 From: Loic Bistuer Date: Fri, 30 Jan 2015 01:15:27 +0700 Subject: Fixed #6707 -- Added RelatedManager.set() and made descriptors' __set__ use it. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks Anssi Kääriäinen, Carl Meyer, Collin Anderson, and Tim Graham for the reviews. --- docs/topics/db/queries.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'docs/topics') diff --git a/docs/topics/db/queries.txt b/docs/topics/db/queries.txt index c616d02b33..34342ab3eb 100644 --- a/docs/topics/db/queries.txt +++ b/docs/topics/db/queries.txt @@ -1190,6 +1190,9 @@ be found in the :doc:`related objects reference `. ``clear()`` Removes all objects from the related object set. +``set(objs)`` + Replace the set of related objects. + To assign the members of a related set in one fell swoop, just assign to it from any iterable object. The iterable can contain object instances, or just a list of primary key values. For example:: -- cgit v1.3