Commit 6ceb0fa9 by Tom Christie

Merge pull request #1252 from thedrow/patch-3

Recommend using Pillow instead of PIL.
parents 43c4e3aa c46106c9
......@@ -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`.
......
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment