Django

Code

Changeset 5066

Show
Ignore:
Timestamp:
04/25/07 01:38:23 (1 year ago)
Author:
mtredinnick
Message:

Fixed #3857 -- Used a table to describe the required arg for FileField?. This
makes it consistent with other argument descriptions. Thanks, whiteinge.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/model-api.txt

    r5040 r5066  
    195195~~~~~~~~~~~~~ 
    196196 
    197 A file-upload field. 
    198  
    199 Has an extra required argument, ``upload_to``, a local filesystem path to 
    200 which files should be upload. This path may contain `strftime formatting`_, 
    201 which will be replaced by the date/time of the file upload (so that 
    202 uploaded files don't fill up the given directory). 
    203  
    204 The admin represents this as an ``<input type="file">`` (a file-upload widget). 
     197A file-upload field. Has one **required** argument: 
     198 
     199    ======================  =================================================== 
     200    Argument                Description 
     201    ======================  =================================================== 
     202    ``upload_to``           A local filesystem path that will be appended to 
     203                            your ``MEDIA_ROOT`` setting to determine the 
     204                            output of the ``get_<fieldname>_url()`` helper 
     205                            function. 
     206    ======================  =================================================== 
     207 
     208This path may contain `strftime formatting`_, which will be replaced by the 
     209date/time of the file upload (so that uploaded files don't fill up the given 
     210directory). 
     211 
     212The admin represents this field as an ``<input type="file">`` (a file-upload 
     213widget). 
    205214 
    206215Using a ``FileField`` or an ``ImageField`` (see below) in a model takes a few 
     
    247256A field whose choices are limited to the filenames in a certain directory 
    248257on the filesystem. Has three special arguments, of which the first is 
    249 required
     258**required**
    250259 
    251260    ======================  ===================================================