diff options
| author | Tom Christie | 2013-12-17 09:45:28 +0000 | 
|---|---|---|
| committer | Tom Christie | 2013-12-17 09:45:28 +0000 | 
| commit | 02ae1682b5585581e88bbd996f7cb7fd22b146f7 (patch) | |
| tree | 03afccfa8f6d2c0e4d1f408321e7370eadf82545 /docs/tutorial | |
| parent | 7bdb1b2eef598e10254e7ec5b8230a683c6dbd5f (diff) | |
| download | django-rest-framework-02ae1682b5585581e88bbd996f7cb7fd22b146f7.tar.bz2 | |
Add note on compat import in tutorial
Diffstat (limited to 'docs/tutorial')
| -rw-r--r-- | docs/tutorial/1-serialization.md | 2 | 
1 files changed, 2 insertions, 0 deletions
| diff --git a/docs/tutorial/1-serialization.md b/docs/tutorial/1-serialization.md index 4d4e7258..e015a545 100644 --- a/docs/tutorial/1-serialization.md +++ b/docs/tutorial/1-serialization.md @@ -183,6 +183,8 @@ 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...  +    # 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      stream = BytesIO(content) | 
