Skip to content

Commit 5ba56dc

Browse files
committed
feedback
1 parent b3bfeb8 commit 5ba56dc

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

source/interact-data/crud.txt

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ collection.
2626

2727
You can use methods provided by the {+framework+} ``QuerySet`` API to run
2828
CRUD operations. To run these operations, you can call ``QuerySet`` methods
29-
on your model's ``Manager``. The ``Manager`` class handles database
29+
on your model's manager. The ``Manager`` class handles database
3030
operations and allows you to interact with your MongoDB data by referencing
3131
Django models. By default, {+framework+} adds a ``Manager`` named ``objects``
3232
to every model class.
@@ -76,6 +76,13 @@ The ``Movie`` model class has the following definition:
7676
def __str__(self):
7777
return self.title
7878

79+
The ``Movie`` model class includes an inner ``Meta`` class and a ``__str__()`` method.
80+
To learn about these model features, see :ref:`django-models-define` in the
81+
Create Models guide.
82+
83+
Run Code Examples
84+
`````````````````
85+
7986
You can use the Python interactive shell to run the code examples.
8087
To enter the shell, run the following command from your project's
8188
root directory:
@@ -103,7 +110,7 @@ Insert Documents
103110
----------------
104111

105112
To insert a document into a collection, call the ``create()`` method on your
106-
model's ``Manager`` class. Pass the new document's field names and field values
113+
model's manager. Pass the new document's field names and field values
107114
as arguments to the ``create()`` method.
108115

109116
Example
@@ -128,14 +135,18 @@ code:
128135
movie = Movie(title="Poor Things", runtime=141)
129136
movie.save()
130137

138+
.. tip::
139+
140+
To learn more about the
141+
131142
.. _django-crud-read:
132143

133144
Read Documents
134145
--------------
135146

136147
To retrieve documents from your collection, call the ``filter()`` method
137-
on your model's ``Manager`` class. Pass a query filter, or criteria
138-
that specifies which documents to retrieve, as an argument to the ``filter()`` method.
148+
on your model's manager. Pass a query filter, or criteria that specifies
149+
which documents to retrieve, as an argument to the ``filter()`` method.
139150

140151
Alternatively, you can call the ``get()`` method to retrieve a single document
141152
that matches your query.
@@ -204,9 +215,9 @@ Modify Documents
204215
----------------
205216

206217
To modify documents in a collection, call the ``filter()`` and ``update()``
207-
methods on your model's ``Manager`` class. Pass a query filter,
208-
or criteria that specifies which documents to update, as an argument to the
209-
``filter()`` method. Then, pass the fields and values you want to update as
218+
methods on your model's manager. Pass a query filter, or criteria that
219+
specifies which documents to update, as an argument to the ``filter()``
220+
method. Then, pass the fields and values you want to update as
210221
arguments to the ``update()`` method.
211222

212223
Example

0 commit comments

Comments
 (0)