summaryrefslogtreecommitdiff
path: root/docs/topics/files.txt
diff options
context:
space:
mode:
authorJames Bennett <ubernostrum@gmail.com>2008-08-31 10:37:44 +0000
committerJames Bennett <ubernostrum@gmail.com>2008-08-31 10:37:44 +0000
commit84ef4a9b1decce8e319359a018eef46a9556b630 (patch)
tree140b0c6879c2526d01626edbf091f66ca0839071 /docs/topics/files.txt
parentce24a1f81d83f6d253798f717357686cb0a26571 (diff)
downloaddjango-84ef4a9b1decce8e319359a018eef46a9556b630.tar.gz
Fixed #8641: Documented the fact that file-saving methods must receive a File instance
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8759 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/topics/files.txt')
-rw-r--r--docs/topics/files.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/topics/files.txt b/docs/topics/files.txt
index dabee7dacb..d17af99c48 100644
--- a/docs/topics/files.txt
+++ b/docs/topics/files.txt
@@ -96,8 +96,9 @@ You can create an instance of some custom file storage class, or -- often more
useful -- you can use the global default storage system::
>>> from django.core.files.storage import default_storage
+ >>> from django.core.files.base import ContentFile
- >>> path = default_storage.save('/path/to/file', 'new content')
+ >>> path = default_storage.save('/path/to/file', ContentFile('new content'))
>>> path
u'/path/to/file'