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/ref/files | |
| parent | ce24a1f81d83f6d253798f717357686cb0a26571 (diff) | |
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/ref/files')
| -rw-r--r-- | docs/ref/files/file.txt | 3 | ||||
| -rw-r--r-- | docs/ref/files/storage.txt | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/docs/ref/files/file.txt b/docs/ref/files/file.txt index bc59311792..aa037f7c2a 100644 --- a/docs/ref/files/file.txt +++ b/docs/ref/files/file.txt @@ -110,6 +110,9 @@ are the same as this one line:: >>> car.photo.save('myphoto.jpg', contents, save=True) +Note that the ``content`` argument must be an instance of +:class:`File` or of a subclass of :class:`File`. + ``File.delete(save=True)`` ~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/ref/files/storage.txt b/docs/ref/files/storage.txt index a09cd2f86d..0ca577059e 100644 --- a/docs/ref/files/storage.txt +++ b/docs/ref/files/storage.txt @@ -42,6 +42,10 @@ If there already exists a file with this name ``name``, the storage system may modify the filename as necessary to get a unique name. The actual name of the stored file will be returned. +The ``content`` argument must be an instance of +:class:`django.db.files.File` or of a subclass of +:class:`~django.db.files.File`. + ``Storage.delete(name)`` ~~~~~~~~~~~~~~~~~~~~~~~~ |
