[2.0.x] Fixed #28651 -- Fixed typo in docs/ref/contrib/postgres/fields.txt.
Backport of 259fec8de0
from master
This commit is contained in:
parent
deb3b58b36
commit
acd870a75a
|
@ -185,11 +185,10 @@ available for :class:`~django.db.models.IntegerField`. For example::
|
||||||
Index transforms
|
Index transforms
|
||||||
~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
This class of transforms allows you to index into the array in queries. Any
|
Index transforms index into the array. Any non-negative integer can be used.
|
||||||
non-negative integer can be used. There are no errors if it exceeds the
|
There are no errors if it exceeds the :attr:`size <ArrayField.size>` of the
|
||||||
:attr:`size <ArrayField.size>` of the array. The lookups available after the
|
array. The lookups available after the transform are those from the
|
||||||
transform are those from the :attr:`base_field <ArrayField.base_field>`. For
|
:attr:`base_field <ArrayField.base_field>`. For example::
|
||||||
example::
|
|
||||||
|
|
||||||
>>> Post.objects.create(name='First post', tags=['thoughts', 'django'])
|
>>> Post.objects.create(name='First post', tags=['thoughts', 'django'])
|
||||||
>>> Post.objects.create(name='Second post', tags=['thoughts'])
|
>>> Post.objects.create(name='Second post', tags=['thoughts'])
|
||||||
|
@ -214,9 +213,9 @@ example::
|
||||||
Slice transforms
|
Slice transforms
|
||||||
~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
This class of transforms allow you to take a slice of the array. Any two
|
Slice transforms take a slice of the array. Any two non-negative integers can
|
||||||
non-negative integers can be used, separated by a single underscore. The
|
be used, separated by a single underscore. The lookups available after the
|
||||||
lookups available after the transform do not change. For example::
|
transform do not change. For example::
|
||||||
|
|
||||||
>>> Post.objects.create(name='First post', tags=['thoughts', 'django'])
|
>>> Post.objects.create(name='First post', tags=['thoughts', 'django'])
|
||||||
>>> Post.objects.create(name='Second post', tags=['thoughts'])
|
>>> Post.objects.create(name='Second post', tags=['thoughts'])
|
||||||
|
|
Loading…
Reference in New Issue