mirror of
https://github.com/django/django.git
synced 2025-03-13 10:50:55 +00:00
Fixed ReST error in docs/db-api.txt
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3567 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
54ea309a1d
commit
aa587cd977
@ -1471,11 +1471,12 @@ the ``ForeignKey`` ``Manager`` has these additional methods:
|
|||||||
b.entry_set.remove(e) # Disassociates Entry e from Blog b.
|
b.entry_set.remove(e) # Disassociates Entry e from Blog b.
|
||||||
|
|
||||||
In order to prevent database inconsistency, this method only exists on
|
In order to prevent database inconsistency, this method only exists on
|
||||||
``ForeignKey``s where ``null=True``. If the related field can't be set to
|
``ForeignKey`` objects where ``null=True``. If the related field can't be
|
||||||
``None`` (``NULL``), then an object can't be removed from a relation
|
set to ``None`` (``NULL``), then an object can't be removed from a
|
||||||
without being added to another. In the above example, removing ``e`` from
|
relation without being added to another. In the above example, removing
|
||||||
``b.entry_set()`` is equivalent to doing ``e.blog = None``, and because
|
``e`` from ``b.entry_set()`` is equivalent to doing ``e.blog = None``,
|
||||||
the ``blog`` ``ForeignKey`` doesn't have ``null=True``, this is invalid.
|
and because the ``blog`` ``ForeignKey`` doesn't have ``null=True``, this
|
||||||
|
is invalid.
|
||||||
|
|
||||||
* ``clear()``: Removes all objects from the related object set.
|
* ``clear()``: Removes all objects from the related object set.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user