You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/tutorial-plain.rst
+12-7
Original file line number
Diff line number
Diff line change
@@ -73,12 +73,23 @@ Let's get started with these models:
73
73
def__str__(self):
74
74
returnself.name
75
75
76
+
Add ingredients as INSTALLED_APPS:
77
+
78
+
.. code:: python
79
+
80
+
INSTALLED_APPS= [
81
+
...
82
+
# Install the ingredients app
83
+
'ingredients',
84
+
]
85
+
76
86
Don't forget to create & run migrations:
77
87
78
88
.. code:: bash
79
89
80
90
python manage.py makemigrations
81
91
python manage.py migrate
92
+
82
93
83
94
Load some test data
84
95
^^^^^^^^^^^^^^^^^^^
@@ -96,9 +107,6 @@ following:
96
107
97
108
Installed 6 object(s) from 1 fixture(s)
98
109
99
-
Note:
100
-
If your run ``$ python ./manage.py loaddata ingredients`` without installing ``ingredients`` app in the project ``settings.py`` you will get the following error ``CommandError: No fixture named 'ingredients' found``. So make sure ``ingredients`` app has been put on the ``settings.py`` INSTALLED_APPS section before running ``$ python ./manage.py loaddata ingredients``.
101
-
102
110
Alternatively you can use the Django admin interface to create some data
103
111
yourself. You'll need to run the development server (see below), and
104
112
create a login for yourself too (``./manage.py createsuperuser``).
@@ -193,17 +201,14 @@ a web-based integrated development environment to assist in the writing
193
201
and executing of GraphQL queries. It will provide us with a simple and
194
202
easy way of testing our cookbook project.
195
203
196
-
Add ``ingredients`` and ``graphene_django`` to ``INSTALLED_APPS`` in ``cookbook/settings.py``:
204
+
Add ``graphene_django`` to ``INSTALLED_APPS`` in ``cookbook/settings.py``:
197
205
198
206
.. code:: python
199
207
200
208
INSTALLED_APPS= [
201
209
...
202
210
# This will also make the `graphql_schema` management command available
203
211
'graphene_django',
204
-
205
-
# Install the ingredients app
206
-
'ingredients',
207
212
]
208
213
209
214
And then add the ``SCHEMA`` to the ``GRAPHENE`` config in ``cookbook/settings.py``:
0 commit comments