Commit 7bdb1b2e by Tom Christie

Merge pull request #1301 from linovia/bugfix/tutorial_for_python3

Fix tutorial's step 1 for Python 3
parents 88940198 80264804
......@@ -183,9 +183,9 @@ At this point we've translated the model instance into Python native datatypes.
Deserialization is similar. First we parse a stream into Python native datatypes...
import StringIO
from rest_framework.compat import BytesIO
stream = StringIO.StringIO(content)
stream = BytesIO(content)
data = JSONParser().parse(stream)
...then we restore those native datatypes into to a fully populated object instance.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment