diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-04-25 06:38:23 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-04-25 06:38:23 +0000 |
| commit | 939f678e6542949e3befd83437d58860b9abac34 (patch) | |
| tree | 28f8587cbf42b13f05c6d42787bd5ba2915ce114 /docs | |
| parent | 56b8914eb968ad49d3a15a98cec65fec849e1227 (diff) | |
Fixed #3857 -- Used a table to describe the required arg for FileField. 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
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/model-api.txt | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/docs/model-api.txt b/docs/model-api.txt index b71668e37f..a14c469661 100644 --- a/docs/model-api.txt +++ b/docs/model-api.txt @@ -194,14 +194,23 @@ This doesn't accept ``maxlength``; its ``maxlength`` is automatically set to ``FileField`` ~~~~~~~~~~~~~ -A file-upload field. +A file-upload field. Has one **required** argument: -Has an extra required argument, ``upload_to``, a local filesystem path to -which files should be upload. This path may contain `strftime formatting`_, -which will be replaced by the date/time of the file upload (so that -uploaded files don't fill up the given directory). + ====================== =================================================== + Argument Description + ====================== =================================================== + ``upload_to`` A local filesystem path that will be appended to + your ``MEDIA_ROOT`` setting to determine the + output of the ``get_<fieldname>_url()`` helper + function. + ====================== =================================================== + +This path may contain `strftime formatting`_, which will be replaced by the +date/time of the file upload (so that uploaded files don't fill up the given +directory). -The admin represents this as an ``<input type="file">`` (a file-upload widget). +The admin represents this field as an ``<input type="file">`` (a file-upload +widget). Using a ``FileField`` or an ``ImageField`` (see below) in a model takes a few steps: @@ -246,7 +255,7 @@ visiting its URL on your site. Don't allow that. A field whose choices are limited to the filenames in a certain directory on the filesystem. Has three special arguments, of which the first is -required: +**required**: ====================== =================================================== Argument Description |
