From 4965a774074780f3e4858bcc975476f71edf2c2c Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Fri, 21 Mar 2014 10:54:53 -0400 Subject: Removed PIL compatability layer per deprecation timeline. refs #19934. --- django/forms/fields.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'django/forms') 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', -- cgit v1.3