diff options
| author | Tom Christie | 2014-12-17 16:32:42 +0000 | 
|---|---|---|
| committer | Tom Christie | 2014-12-17 16:32:42 +0000 | 
| commit | a0a601301ff0a42d1e0905d29194e638690f32bb (patch) | |
| tree | 1e71a36ef3ffe78ea68385dbc3c246102a5aa490 /tutorial/1-serialization/index.html | |
| parent | 760da25c6018eff02b3aab33dc6fea7c93881d9f (diff) | |
| download | django-rest-framework-a0a601301ff0a42d1e0905d29194e638690f32bb.tar.bz2 | |
Update documentation
Diffstat (limited to 'tutorial/1-serialization/index.html')
| -rw-r--r-- | tutorial/1-serialization/index.html | 4 | 
1 files changed, 1 insertions, 3 deletions
| diff --git a/tutorial/1-serialization/index.html b/tutorial/1-serialization/index.html index 5682989c..0561fab1 100644 --- a/tutorial/1-serialization/index.html +++ b/tutorial/1-serialization/index.html @@ -533,9 +533,7 @@ content  # '{"pk": 2, "title": "", "code": "print \\"hello, world\\"\\n", "linenos": false, "language": "python", "style": "friendly"}'  </code></pre>  <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 django.utils.six import BytesIO +<pre><code>from django.utils.six import BytesIO  stream = BytesIO(content)  data = JSONParser().parse(stream) | 
