diff options
author | James Bennett <ubernostrum@gmail.com> | 2008-08-31 10:37:44 +0000 |
---|---|---|
committer | James Bennett <ubernostrum@gmail.com> | 2008-08-31 10:37:44 +0000 |
commit | 84ef4a9b1decce8e319359a018eef46a9556b630 (patch) | |
tree | 140b0c6879c2526d01626edbf091f66ca0839071 /docs/topics/files.txt | |
parent | ce24a1f81d83f6d253798f717357686cb0a26571 (diff) | |
download | django-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.txt | 3 |
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' |