From 1e429df748867097451bf0b45d1080ae6828d921 Mon Sep 17 00:00:00 2001 From: Harrison88 Date: Tue, 20 Aug 2019 05:01:10 -0500 Subject: [PATCH] Fixed #30695 -- Used relative path in default_storage docs example. --- docs/topics/files.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/topics/files.txt b/docs/topics/files.txt index 3154459116..6da50f064c 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)