diff options
Diffstat (limited to 'tutorial/1-serialization')
| -rw-r--r-- | tutorial/1-serialization/index.html | 4 | 
1 files changed, 2 insertions, 2 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)) | 
