Skip to content

Commit 17fb974

Browse files
committed
Add a prefix to ArrayField's fieldlookup directives
Otherwise, they collide with django.contrib.postgres's ArrayField.
1 parent 2617e5b commit 17fb974

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/source/ref/models/fields.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ We will use the following example model::
9191
def __str__(self):
9292
return self.name
9393

94-
.. fieldlookup:: arrayfield.contains
94+
.. fieldlookup:: mongo-arrayfield.contains
9595

9696
``contains``
9797
^^^^^^^^^^^^
@@ -134,7 +134,7 @@ passed. It uses the ``$setIntersection`` operator. For example:
134134
>>> Post.objects.filter(tags__contained_by=["thoughts", "django", "tutorial"])
135135
<QuerySet [<Post: First post>, <Post: Second post>, <Post: Third post>]>
136136
137-
.. fieldlookup:: arrayfield.overlap
137+
.. fieldlookup:: mongo-arrayfield.overlap
138138

139139
``overlap``
140140
~~~~~~~~~~~
@@ -154,7 +154,7 @@ uses the ``$setIntersection`` operator. For example:
154154
>>> Post.objects.filter(tags__overlap=["thoughts", "tutorial"])
155155
<QuerySet [<Post: First post>, <Post: Second post>, <Post: Third post>]>
156156
157-
.. fieldlookup:: arrayfield.len
157+
.. fieldlookup:: mongo-arrayfield.len
158158

159159
``len``
160160
^^^^^^^
@@ -170,7 +170,7 @@ available for :class:`~django.db.models.IntegerField`. For example:
170170
>>> Post.objects.filter(tags__len=1)
171171
<QuerySet [<Post: Second post>]>
172172
173-
.. fieldlookup:: arrayfield.index
173+
.. fieldlookup:: mongo-arrayfield.index
174174

175175
Index transforms
176176
^^^^^^^^^^^^^^^^
@@ -196,7 +196,7 @@ array. The lookups available after the transform are those from the
196196
197197
These indexes use 0-based indexing.
198198

199-
.. fieldlookup:: arrayfield.slice
199+
.. fieldlookup:: mongo-arrayfield.slice
200200

201201
Slice transforms
202202
^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)