diff options
| author | Tom Christie | 2014-12-17 16:23:42 +0000 | 
|---|---|---|
| committer | Tom Christie | 2014-12-17 16:23:42 +0000 | 
| commit | 760da25c6018eff02b3aab33dc6fea7c93881d9f (patch) | |
| tree | cda0f7ea1821d3054be7f9e9251e37b4c06281b7 /tutorial/1-serialization/index.html | |
| parent | c05c1f5c7cf562634382c25716d7a7588794f107 (diff) | |
| download | django-rest-framework-760da25c6018eff02b3aab33dc6fea7c93881d9f.tar.bz2 | |
Update documentation
Diffstat (limited to 'tutorial/1-serialization/index.html')
| -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)) | 
