Fixed #8638 -- Show by example that the File.name attribute includes the upload

directory as well as the filename. Patch from Ramiro Morales.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8695 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick 2008-08-29 05:15:49 +00:00
parent 2dba41056f
commit 6ebbf7ac96
1 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@ the details of the attached photo::
>>> car.photo >>> car.photo
<ImageFieldFile: chevy.jpg> <ImageFieldFile: chevy.jpg>
>>> car.photo.name >>> car.photo.name
u'chevy.jpg' u'cars/chevy.jpg'
>>> car.photo.path >>> car.photo.path
u'/media/cars/chevy.jpg' u'/media/cars/chevy.jpg'
>>> car.photo.url >>> car.photo.url
@ -143,4 +143,4 @@ For example, the following code will store uploaded files under
photo = models.ImageField(storage=fs) photo = models.ImageField(storage=fs)
:ref:`Custom storage systems <howto-custom-file-storage>` work the same way: you :ref:`Custom storage systems <howto-custom-file-storage>` work the same way: you
can pass them in as the ``storage`` argument to a ``FileField``. can pass them in as the ``storage`` argument to a ``FileField``.