diff options
Diffstat (limited to 'tutorial')
| -rw-r--r-- | tutorial/1-serialization/index.html | 4 | ||||
| -rw-r--r-- | tutorial/2-requests-and-responses/index.html | 2 | ||||
| -rw-r--r-- | tutorial/quickstart/index.html | 2 | 
3 files changed, 4 insertions, 4 deletions
| diff --git a/tutorial/1-serialization/index.html b/tutorial/1-serialization/index.html index 435d47e6..5682989c 100644 --- a/tutorial/1-serialization/index.html +++ b/tutorial/1-serialization/index.html @@ -535,7 +535,7 @@ content  <p>Deserialization is similar.  First we parse a stream into Python native datatypes...</p>  <pre><code># This import will use either `StringIO.StringIO` or `io.BytesIO`  # as appropriate, depending on if we're running Python 2 or Python 3. -from rest_framework.compat import BytesIO +from django.utils.six import BytesIO  stream = BytesIO(content)  data = JSONParser().parse(stream) @@ -565,7 +565,7 @@ Open the file <code>snippets/serializers.py</code> again, and edit the <code>Sni          model = Snippet          fields = ('id', 'title', 'code', 'linenos', 'language', 'style')  </code></pre> -<p>One nice property that serializers have is that you can inspect all the fields in a serializer instance, by printing it's representation. Open the Django shell with <code>python manange.py shell</code>, then try the following:</p> +<p>One nice property that serializers have is that you can inspect all the fields in a serializer instance, by printing it's representation. Open the Django shell with <code>python manage.py shell</code>, then try the following:</p>  <pre><code>>>> from snippets.serializers import SnippetSerializer  >>> serializer = SnippetSerializer()  >>> print(repr(serializer)) diff --git a/tutorial/2-requests-and-responses/index.html b/tutorial/2-requests-and-responses/index.html index 9fa4b092..e9436d2a 100644 --- a/tutorial/2-requests-and-responses/index.html +++ b/tutorial/2-requests-and-responses/index.html @@ -547,7 +547,7 @@ http --json POST http://127.0.0.1:8000/snippets/ code="print 456"      "id": 4,      "title": "",      "code": "print 456", -    "linenos": true, +    "linenos": false,      "language": "python",      "style": "friendly"  } diff --git a/tutorial/quickstart/index.html b/tutorial/quickstart/index.html index 64243dc0..b81e1dc4 100644 --- a/tutorial/quickstart/index.html +++ b/tutorial/quickstart/index.html @@ -403,7 +403,7 @@ pip install django  pip install djangorestframework  # Set up a new project with a single application -django-admin.py startproject tutorial . +django-admin.py startproject tutorial .  # Note the trailing '.' character  cd tutorial  django-admin.py startapp quickstart  cd .. | 
