Author: ubernostrum
Date: 2008-08-31 05:37:44 -0500 (Sun, 31 Aug 2008)
New Revision: 8759

Modified:
   django/trunk/docs/ref/files/file.txt
   django/trunk/docs/ref/files/storage.txt
   django/trunk/docs/topics/files.txt
Log:
Fixed #8641: Documented the fact that file-saving methods must receive a File 
instance

Modified: django/trunk/docs/ref/files/file.txt
===================================================================
--- django/trunk/docs/ref/files/file.txt        2008-08-31 10:23:36 UTC (rev 
8758)
+++ django/trunk/docs/ref/files/file.txt        2008-08-31 10:37:44 UTC (rev 
8759)
@@ -110,6 +110,9 @@
 
     >>> 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)``
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
 

Modified: django/trunk/docs/ref/files/storage.txt
===================================================================
--- django/trunk/docs/ref/files/storage.txt     2008-08-31 10:23:36 UTC (rev 
8758)
+++ django/trunk/docs/ref/files/storage.txt     2008-08-31 10:37:44 UTC (rev 
8759)
@@ -42,6 +42,10 @@
 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)``
 ~~~~~~~~~~~~~~~~~~~~~~~~
 

Modified: django/trunk/docs/topics/files.txt
===================================================================
--- django/trunk/docs/topics/files.txt  2008-08-31 10:23:36 UTC (rev 8758)
+++ django/trunk/docs/topics/files.txt  2008-08-31 10:37:44 UTC (rev 8759)
@@ -96,8 +96,9 @@
 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'
 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to