File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed
source/django-get-started Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -63,10 +63,9 @@ in the Django documentation.
63
63
Enter the username and password created in the previous step to log in to
64
64
the site.
65
65
66
- .. step:: Access your sample_mflix app from the admin site
66
+ .. step:: Access your " sample_mflix" app from the admin site
67
67
68
- After logging in to the admin site, you can see the following index
69
- page:
68
+ After logging in to the admin site, you can see the following information:
70
69
71
70
.. figure:: /includes/figures/django_admin_index.png
72
71
:alt: The initial content displayed on the Django admin site.
Original file line number Diff line number Diff line change @@ -14,11 +14,15 @@ Query MongoDB Data
14
14
.. procedure::
15
15
:style: connected
16
16
17
- .. step:: Query the users collection for a specified email
17
+ .. step:: Query the " users" collection for a specified email
18
18
19
- Start a Python shell and include the required imports
19
+ Start a Python shell and import the required models
20
20
by running the following code:
21
21
22
+ .. code-block:: bash
23
+
24
+ python3 manage.py shell
25
+ from sample_mflix.models import Movie, Viewer
22
26
23
27
Then, run the following code to query the
24
28
``sample_mflix.users`` collection for a movie viewer whose email is
@@ -35,7 +39,7 @@ Query MongoDB Data
35
39
36
40
<QuerySet [<Viewer: Khal Drogo>]>
37
41
38
- .. step:: Query the movies collection for runtime values
42
+ .. step:: Query the " movies' collection for specified runtime values
39
43
40
44
Run the following code to query the ``sample_mflix.movies``
41
45
collection for movies that have a ``runtime`` value less than
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ Write Data to MongoDB
122
122
database by visiting the http://127.0.0.1:8000/sample_mflix/viewers_list/
123
123
URL. You should see a list of ten viewer names in the ``sample_mflix.users``
124
124
database, with your new viewer listed at the top. Ensure that the
125
- viewer named "Alliser Thorne", deleted in the previous step, does not appear
125
+ viewer named "Alliser Thorne", deleted in a previous step, does not appear
126
126
in this list.
127
127
128
128
After completing these steps, you have inserted and edited documents
You can’t perform that action at this time.
0 commit comments