summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-10-08 17:17:10 -0400
committerTim Graham <timograham@gmail.com>2015-10-27 07:57:15 -0400
commit9c5e272860c076736237d4b280c7c922c46ba273 (patch)
tree69727482a17b9bf2594c0755ee9f00f5f361cea0 /docs/ref
parent0b5d32facaa1badc0553934f6935507070cfea1b (diff)
Fixed #25550 -- Deprecated direct assignment to the reverse side of a related set.
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/contrib/auth.txt2
-rw-r--r--docs/ref/models/relations.txt11
2 files changed, 10 insertions, 3 deletions
diff --git a/docs/ref/contrib/auth.txt b/docs/ref/contrib/auth.txt
index 217bd432b5..6cbfd88ac6 100644
--- a/docs/ref/contrib/auth.txt
+++ b/docs/ref/contrib/auth.txt
@@ -337,7 +337,7 @@ Fields
Many-to-many field to :class:`~django.contrib.auth.models.Permission`::
- group.permissions = [permission_list]
+ group.permissions.set([permission_list])
group.permissions.add(permission, permission, ...)
group.permissions.remove(permission, permission, ...)
group.permissions.clear()
diff --git a/docs/ref/models/relations.txt b/docs/ref/models/relations.txt
index e89355679a..8671d83d51 100644
--- a/docs/ref/models/relations.txt
+++ b/docs/ref/models/relations.txt
@@ -179,8 +179,6 @@ Related objects reference
<intermediary-manytomany>` for a many-to-many relationship, some of the
related manager's methods are disabled.
-.. _direct-assignment:
-
Direct Assignment
-----------------
@@ -200,3 +198,12 @@ added to the existing related object set.
In earlier versions, direct assignment used to perform ``clear()`` followed
by ``add()``. It now performs a ``set()`` with the keyword argument
``clear=False``.
+
+.. deprecated:: 1.10
+
+ Direct assignment is deprecated in favor of the
+ :meth:`~django.db.models.fields.related.RelatedManager.set` method::
+
+ >>> e.related_set.set([obj1, obj2, obj3])
+
+ This prevents confusion about an assignment resulting in an implicit save.