Merge pull request #1252 from thedrow/patch-3

Recommend using Pillow instead of PIL.
This commit is contained in:
Tom Christie 2013-11-27 04:55:59 -08:00
commit 6ceb0fa94a
2 changed files with 2 additions and 2 deletions

View File

@ -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`.

View File

@ -966,7 +966,7 @@ class ImageField(FileField):
return None
from rest_framework.compat import Image
assert Image is not None, 'PIL must be installed for ImageField support'
assert Image is not None, 'Either Pillow or PIL must be installed for ImageField support.'
# We need to get a file object for PIL. We might have a path or we might
# have to read the data into memory.