diff options
| author | Tom Christie | 2013-12-17 01:42:47 -0800 |
|---|---|---|
| committer | Tom Christie | 2013-12-17 01:42:47 -0800 |
| commit | 7bdb1b2eef598e10254e7ec5b8230a683c6dbd5f (patch) | |
| tree | ff1128e4e08c76efb12e61b9219d68c6daaf6bea | |
| parent | 889401989948db9e9825478e71aa1611b4390d17 (diff) | |
| parent | 802648045476f91f1c4b6a9f507cc08625194c2c (diff) | |
| download | django-rest-framework-7bdb1b2eef598e10254e7ec5b8230a683c6dbd5f.tar.bz2 | |
Merge pull request #1301 from linovia/bugfix/tutorial_for_python3
Fix tutorial's step 1 for Python 3
| -rw-r--r-- | docs/tutorial/1-serialization.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/tutorial/1-serialization.md b/docs/tutorial/1-serialization.md index e1c0009c..4d4e7258 100644 --- a/docs/tutorial/1-serialization.md +++ b/docs/tutorial/1-serialization.md @@ -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. |
