mirror of
https://github.com/django/django.git
synced 2025-06-05 03:29:12 +00:00
[1.10.x] Fixed typos in db/models/fields/related_descriptors.py
Backport of 1a2a7cc01e7c46432605854f143a548635f027e5 and 908c26b079f2d657e30a3155d591a2467ba7d339 from master
This commit is contained in:
parent
32ab8c0340
commit
34f13e030b
@ -200,7 +200,7 @@ class ForwardManyToOneDescriptor(object):
|
|||||||
|
|
||||||
- ``self`` is the descriptor managing the ``parent`` attribute
|
- ``self`` is the descriptor managing the ``parent`` attribute
|
||||||
- ``instance`` is the ``child`` instance
|
- ``instance`` is the ``child`` instance
|
||||||
- ``value`` in the ``parent`` instance on the right of the equal sign
|
- ``value`` is the ``parent`` instance on the right of the equal sign
|
||||||
"""
|
"""
|
||||||
# An object must be an instance of the related class.
|
# An object must be an instance of the related class.
|
||||||
if value is not None and not isinstance(value, self.field.remote_field.model._meta.concrete_model):
|
if value is not None and not isinstance(value, self.field.remote_field.model._meta.concrete_model):
|
||||||
@ -336,7 +336,7 @@ class ReverseOneToOneDescriptor(object):
|
|||||||
|
|
||||||
- ``self`` is the descriptor managing the ``restaurant`` attribute
|
- ``self`` is the descriptor managing the ``restaurant`` attribute
|
||||||
- ``instance`` is the ``place`` instance
|
- ``instance`` is the ``place`` instance
|
||||||
- ``instance_type`` in the ``Place`` class (we don't need it)
|
- ``cls`` is the ``Place`` class (unused)
|
||||||
|
|
||||||
Keep in mind that ``Restaurant`` holds the foreign key to ``Place``.
|
Keep in mind that ``Restaurant`` holds the foreign key to ``Place``.
|
||||||
"""
|
"""
|
||||||
@ -383,7 +383,7 @@ class ReverseOneToOneDescriptor(object):
|
|||||||
|
|
||||||
- ``self`` is the descriptor managing the ``restaurant`` attribute
|
- ``self`` is the descriptor managing the ``restaurant`` attribute
|
||||||
- ``instance`` is the ``place`` instance
|
- ``instance`` is the ``place`` instance
|
||||||
- ``value`` in the ``restaurant`` instance on the right of the equal sign
|
- ``value`` is the ``restaurant`` instance on the right of the equal sign
|
||||||
|
|
||||||
Keep in mind that ``Restaurant`` holds the foreign key to ``Place``.
|
Keep in mind that ``Restaurant`` holds the foreign key to ``Place``.
|
||||||
"""
|
"""
|
||||||
@ -470,7 +470,7 @@ class ReverseManyToOneDescriptor(object):
|
|||||||
|
|
||||||
- ``self`` is the descriptor managing the ``children`` attribute
|
- ``self`` is the descriptor managing the ``children`` attribute
|
||||||
- ``instance`` is the ``parent`` instance
|
- ``instance`` is the ``parent`` instance
|
||||||
- ``instance_type`` in the ``Parent`` class (we don't need it)
|
- ``cls`` is the ``Parent`` class (unused)
|
||||||
"""
|
"""
|
||||||
if instance is None:
|
if instance is None:
|
||||||
return self
|
return self
|
||||||
@ -485,7 +485,7 @@ class ReverseManyToOneDescriptor(object):
|
|||||||
|
|
||||||
- ``self`` is the descriptor managing the ``children`` attribute
|
- ``self`` is the descriptor managing the ``children`` attribute
|
||||||
- ``instance`` is the ``parent`` instance
|
- ``instance`` is the ``parent`` instance
|
||||||
- ``value`` in the ``children`` sequence on the right of the equal sign
|
- ``value`` is the ``children`` sequence on the right of the equal sign
|
||||||
"""
|
"""
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
'Direct assignment to the reverse side of a related set is '
|
'Direct assignment to the reverse side of a related set is '
|
||||||
|
Loading…
x
Reference in New Issue
Block a user