summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2013-04-11 14:13:09 -0400
committerTim Graham <timograham@gmail.com>2013-04-11 14:17:19 -0400
commit709ee83cd3ccbaeabcfcbb9391bb72d1bcaf01d3 (patch)
treef644c9d9330ebbaff4388b93175edffcf2c9a319
parent93231851f8dd4e1882f601de9086d7aaf46b93a9 (diff)
[1.5.x] Fixed #20243 - Clarified when RelatedManager.remove() exists.
Backport of 712a792713 from master
-rw-r--r--docs/ref/models/relations.txt15
1 files changed, 7 insertions, 8 deletions
diff --git a/docs/ref/models/relations.txt b/docs/ref/models/relations.txt
index 37986ec08d..c923961a19 100644
--- a/docs/ref/models/relations.txt
+++ b/docs/ref/models/relations.txt
@@ -82,14 +82,13 @@ Related objects reference
>>> e = Entry.objects.get(id=234)
>>> b.entry_set.remove(e) # Disassociates Entry e from Blog b.
- In order to prevent database inconsistency, this method only exists on
- :class:`~django.db.models.ForeignKey` objects where ``null=True``. If
- the related field can't be set to ``None`` (``NULL``), then an object
- can't be removed from a relation without being added to another. In the
- above example, removing ``e`` from ``b.entry_set()`` is equivalent to
- doing ``e.blog = None``, and because the ``blog``
- :class:`~django.db.models.ForeignKey` doesn't have ``null=True``, this
- is invalid.
+ For :class:`~django.db.models.ForeignKey` objects, this method only
+ exists if ``null=True``. If the related field can't be set to ``None``
+ (``NULL``), then an object can't be removed from a relation without
+ being added to another. In the above example, removing ``e`` from
+ ``b.entry_set()`` is equivalent to doing ``e.blog = None``, and because
+ the ``blog`` :class:`~django.db.models.ForeignKey` doesn't have
+ ``null=True``, this is invalid.
.. method:: clear()