aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide/fields.md
diff options
context:
space:
mode:
authorTom Christie2013-12-13 16:32:34 +0000
committerTom Christie2013-12-13 16:32:34 +0000
commit9c41c007afc71c899306bcb02e40bdfc36b09146 (patch)
treeca0da04aed0c1b96ddf14a801dc54b5a72a72461 /docs/api-guide/fields.md
parented931b90ae9e72f963673e6e188b1802a5a65360 (diff)
parentca244ad614e2f6fb4fef1dc9987be996d2624303 (diff)
downloaddjango-rest-framework-9c41c007afc71c899306bcb02e40bdfc36b09146.tar.bz2
Merge branch 'master' into 2.4.0
Conflicts: .travis.yml docs/api-guide/routers.md docs/topics/release-notes.md rest_framework/compat.py
Diffstat (limited to 'docs/api-guide/fields.md')
-rw-r--r--docs/api-guide/fields.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/api-guide/fields.md b/docs/api-guide/fields.md
index 962c49e2..e05c0306 100644
--- a/docs/api-guide/fields.md
+++ b/docs/api-guide/fields.md
@@ -41,7 +41,7 @@ Defaults to `True`.
### `default`
-If set, this gives the default value that will be used for the field if none is supplied. If not set the default behavior is to not populate the attribute at all.
+If set, this gives the default value that will be used for the field if no input value is supplied. If not set the default behavior is to not populate the attribute at all.
May be set to a function or other callable, in which case the value will be evaluated each time it is used.
@@ -286,7 +286,7 @@ An image representation.
Corresponds to `django.forms.fields.ImageField`.
-Requires the `PIL` package.
+Requires either the `Pillow` package or `PIL` package. The `Pillow` package is recommended, as `PIL` is no longer actively maintained.
Signature and validation is the same as with `FileField`.
@@ -299,9 +299,9 @@ Django's regular [FILE_UPLOAD_HANDLERS] are used for handling uploaded files.
# Custom fields
-If you want to create a custom field, you'll probably want to override either one or both of the `.to_native()` and `.from_native()` methods. These two methods are used to convert between the initial datatype, and a primative, serializable datatype. Primative datatypes may be any of a number, string, date/time/datetime or None. They may also be any list or dictionary like object that only contains other primative objects.
+If you want to create a custom field, you'll probably want to override either one or both of the `.to_native()` and `.from_native()` methods. These two methods are used to convert between the initial datatype, and a primitive, serializable datatype. Primitive datatypes may be any of a number, string, date/time/datetime or None. They may also be any list or dictionary like object that only contains other primitive objects.
-The `.to_native()` method is called to convert the initial datatype into a primative, serializable datatype. The `from_native()` method is called to restore a primative datatype into it's initial representation.
+The `.to_native()` method is called to convert the initial datatype into a primitive, serializable datatype. The `from_native()` method is called to restore a primitive datatype into it's initial representation.
## Examples