From d9353f8ba65842a5ecf817009807ac7e6864a12f Mon Sep 17 00:00:00 2001 From: Cesar Canassa Date: Wed, 22 May 2019 12:36:56 +0200 Subject: [PATCH] Make the examples Python 3 compatible --- docs/backends/amazon-S3.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/backends/amazon-S3.rst b/docs/backends/amazon-S3.rst index 37e2883e3..3da01b2c2 100644 --- a/docs/backends/amazon-S3.rst +++ b/docs/backends/amazon-S3.rst @@ -273,7 +273,7 @@ An object without a file has limited functionality:: Saving a file enables full functionality:: - >>> obj1.normal.save('django_test.txt', ContentFile('content')) + >>> obj1.normal.save('django_test.txt', ContentFile(b'content')) >>> obj1.normal >>> obj1.normal.size @@ -294,7 +294,7 @@ Files can be read in a little at a time, if necessary:: Save another file with the same name:: >>> obj2 = MyModel() - >>> obj2.normal.save('django_test.txt', ContentFile('more content')) + >>> obj2.normal.save('django_test.txt', ContentFile(b'more content')) >>> obj2.normal >>> obj2.normal.size