Skip to content

Commit

Permalink
Merge pull request #216 from Txumari/patch-1
Browse files Browse the repository at this point in the history
Fix install ingredients app
  • Loading branch information
syrusakbary committed Jul 24, 2017
2 parents 1bddae1 + e425758 commit cec1a84
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions docs/tutorial-plain.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,23 @@ Let's get started with these models:
def __str__(self):
return self.name
Add ingredients as INSTALLED_APPS:

.. code:: python
INSTALLED_APPS = [
...
# Install the ingredients app
'ingredients',
]
Don't forget to create & run migrations:

.. code:: bash
python manage.py makemigrations
python manage.py migrate
Load some test data
^^^^^^^^^^^^^^^^^^^
Expand All @@ -96,9 +107,6 @@ following:
Installed 6 object(s) from 1 fixture(s)
Note:
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``.

Alternatively you can use the Django admin interface to create some data
yourself. You'll need to run the development server (see below), and
create a login for yourself too (``./manage.py createsuperuser``).
Expand Down Expand Up @@ -193,17 +201,14 @@ a web-based integrated development environment to assist in the writing
and executing of GraphQL queries. It will provide us with a simple and
easy way of testing our cookbook project.

Add ``ingredients`` and ``graphene_django`` to ``INSTALLED_APPS`` in ``cookbook/settings.py``:
Add ``graphene_django`` to ``INSTALLED_APPS`` in ``cookbook/settings.py``:

.. code:: python
INSTALLED_APPS = [
...
# This will also make the `graphql_schema` management command available
'graphene_django',
# Install the ingredients app
'ingredients',
]
And then add the ``SCHEMA`` to the ``GRAPHENE`` config in ``cookbook/settings.py``:
Expand Down

0 comments on commit cec1a84

Please sign in to comment.