diff options
Diffstat (limited to 'django/forms')
| -rw-r--r-- | django/forms/fields.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/forms/fields.py b/django/forms/fields.py index 63ed153f0b..0ee66a9db3 100644 --- a/django/forms/fields.py +++ b/django/forms/fields.py @@ -641,7 +641,7 @@ class ImageField(FileField): if f is None: return None - from django.utils.image import Image + from PIL import Image # We need to get a file object for Pillow. We might have a path or we might # have to read the data into memory. @@ -659,7 +659,7 @@ class ImageField(FileField): # verify() must be called immediately after the constructor. Image.open(file).verify() except Exception: - # Pillow (or PIL) doesn't recognize it as an image. + # Pillow doesn't recognize it as an image. six.reraise(ValidationError, ValidationError( self.error_messages['invalid_image'], code='invalid_image', |
