Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #3857 -- Used a table to describe the required arg for FileFiel…

…d. This

makes it consistent with other argument descriptions. Thanks, whiteinge.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5066 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 939f678e6542949e3befd83437d58860b9abac34 1 parent 56b8914
Malcolm Tredinnick authored April 25, 2007

Showing 1 changed file with 16 additions and 7 deletions. Show diff stats Hide diff stats

  1. 23  docs/model-api.txt
23  docs/model-api.txt
@@ -194,14 +194,23 @@ This doesn't accept ``maxlength``; its ``maxlength`` is automatically set to
194 194
 ``FileField``
195 195
 ~~~~~~~~~~~~~
196 196
 
197  
-A file-upload field.
  197
+A file-upload field. Has one **required** argument:
198 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).
  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
+
  208
+This path may contain `strftime formatting`_, which will be replaced by the
  209
+date/time of the file upload (so that uploaded files don't fill up the given
  210
+directory).
203 211
 
204  
-The admin represents this as an ``<input type="file">`` (a file-upload widget).
  212
+The admin represents this field as an ``<input type="file">`` (a file-upload
  213
+widget).
205 214
 
206 215
 Using a ``FileField`` or an ``ImageField`` (see below) in a model takes a few
207 216
 steps:
@@ -246,7 +255,7 @@ visiting its URL on your site. Don't allow that.
246 255
 
247 256
 A field whose choices are limited to the filenames in a certain directory
248 257
 on the filesystem. Has three special arguments, of which the first is
249  
-required:
  258
+**required**:
250 259
 
251 260
     ======================  ===================================================
252 261
     Argument                Description

0 notes on commit 939f678

Please sign in to comment.
Something went wrong with that request. Please try again.