diff options
| author | Tim Graham <timograham@gmail.com> | 2014-03-21 10:54:53 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-03-21 10:54:53 -0400 |
| commit | 4965a774074780f3e4858bcc975476f71edf2c2c (patch) | |
| tree | 938b3f520bf53384ca644c4e85cf737a9a466771 /django/forms | |
| parent | 6d1ae5e27c3fe612209023bacd8a201fffedc375 (diff) | |
Removed PIL compatability layer per deprecation timeline.
refs #19934.
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', |
