summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorHarrison88 <harrison.morgan@gmail.com>2019-08-20 05:01:10 -0500
committerCarlton Gibson <carlton.gibson@noumenal.es>2019-08-20 12:03:04 +0200
commit0dc3ad163a7343347af710f4e057fbdb3d0eacf4 (patch)
treee70f4c895474f89bad259f09a51c30e30b272eb7 /docs
parent4a24fe940e5f5d519ffff80fce541595919eb754 (diff)
[2.2.x] Fixed #30695 -- Used relative path in default_storage docs example.
Backport of 1e429df748867097451bf0b45d1080ae6828d921 from master
Diffstat (limited to 'docs')
-rw-r--r--docs/topics/files.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/topics/files.txt b/docs/topics/files.txt
index 6a2ff44f0b..6318f207e2 100644
--- a/docs/topics/files.txt
+++ b/docs/topics/files.txt
@@ -143,14 +143,14 @@ useful -- you can use the global default storage system::
>>> from django.core.files.base import ContentFile
>>> from django.core.files.storage import default_storage
- >>> path = default_storage.save('/path/to/file', ContentFile('new content'))
+ >>> path = default_storage.save('path/to/file', ContentFile(b'new content'))
>>> path
- '/path/to/file'
+ 'path/to/file'
>>> default_storage.size(path)
11
>>> default_storage.open(path).read()
- 'new content'
+ b'new content'
>>> default_storage.delete(path)
>>> default_storage.exists(path)