From 85da376333adfc1edc9b62bd0140bde40d6e9b4c Mon Sep 17 00:00:00 2001 From: Thierry Guillemot Date: Mon, 5 Dec 2016 10:59:06 +0100 Subject: [PATCH 1/2] Fix the setup of the cookbook example `ingredients` and `recipes` from [examples/cookbook](https://github.com/graphql-python/graphene-django/tree/master/examples/cookbook) are included in cookbook/cookbook. By following the tutorial `ingredients` and `recipes` are in `cookbook/`. Two possibilities : 1) There is a mistake in the doc and I can correct it by adding a `cd cookbook` (as done by the PR) 2) Correct the [examples/cookbook](https://github.com/graphql-python/graphene-django/tree/master/examples/cookbook). Solution 1 is easier but I prefer the solution 2 because it is closer of what is done in the [django tutorial](https://docs.djangoproject.com/en/1.10/intro/tutorial01/). --- docs/tutorial.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/tutorial.rst b/docs/tutorial.rst index cd201b9..56c492d 100644 --- a/docs/tutorial.rst +++ b/docs/tutorial.rst @@ -31,6 +31,7 @@ We will setup the project, create the following: # Set up a new project with a single application django-admin.py startproject cookbook . # Note the trailing '.' character + cd cookbook django-admin.py startapp ingredients Now sync your database for the first time: From 3f139da7ae531f33b8b75aabcca8794dbdfa7a23 Mon Sep 17 00:00:00 2001 From: Thierry Guillemot Date: Mon, 5 Dec 2016 11:01:49 +0100 Subject: [PATCH 2/2] Fix Post name attribute The `PostNode` class uses as model Post which does not have any field `title` --- docs/authorization.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/authorization.rst b/docs/authorization.rst index 89c2059..9ee7d0a 100644 --- a/docs/authorization.rst +++ b/docs/authorization.rst @@ -12,7 +12,7 @@ Let's use a simple example model. from django.db import models class Post(models.Model): - name = models.CharField(max_length=100) + title = models.CharField(max_length=100) content = models.TextField() published = models.BooleanField(default=False) owner = models.ForeignKey('auth.User')