Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #20243 - Clarified when RelatedManager.remove() exists.

  • Loading branch information...
commit 712a7927139e3abf9532d73bc88d35e0ebb3a022 1 parent 9a62fc3
Tim Graham authored April 11, 2013

Showing 1 changed file with 7 additions and 8 deletions. Show diff stats Hide diff stats

  1. 15  docs/ref/models/relations.txt
15  docs/ref/models/relations.txt
@@ -82,14 +82,13 @@ Related objects reference
82 82
             >>> e = Entry.objects.get(id=234)
83 83
             >>> b.entry_set.remove(e) # Disassociates Entry e from Blog b.
84 84
 
85  
-        In order to prevent database inconsistency, this method only exists on
86  
-        :class:`~django.db.models.ForeignKey` objects where ``null=True``. If
87  
-        the related field can't be set to ``None`` (``NULL``), then an object
88  
-        can't be removed from a relation without being added to another. In the
89  
-        above example, removing ``e`` from ``b.entry_set()`` is equivalent to
90  
-        doing ``e.blog = None``, and because the ``blog``
91  
-        :class:`~django.db.models.ForeignKey` doesn't have ``null=True``, this
92  
-        is invalid.
  85
+        For :class:`~django.db.models.ForeignKey` objects, this method only
  86
+        exists if ``null=True``. If the related field can't be set to ``None``
  87
+        (``NULL``), then an object can't be removed from a relation without
  88
+        being added to another. In the above example, removing ``e`` from
  89
+        ``b.entry_set()`` is equivalent to doing ``e.blog = None``, and because
  90
+        the ``blog`` :class:`~django.db.models.ForeignKey` doesn't have
  91
+        ``null=True``, this is invalid.
93 92
 
94 93
     .. method:: clear()
95 94
 

0 notes on commit 712a792

Please sign in to comment.
Something went wrong with that request. Please try again.