mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
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
This commit is contained in:
parent
ce24a1f81d
commit
84ef4a9b1d
3 changed files with 9 additions and 1 deletions
|
@ -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)``
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
|
|
@ -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)``
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue