summaryrefslogtreecommitdiff
path: root/tests/model_fields/models.py
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2014-03-21 10:54:53 -0400
committerTim Graham <timograham@gmail.com>2014-03-21 10:54:53 -0400
commit4965a774074780f3e4858bcc975476f71edf2c2c (patch)
tree938b3f520bf53384ca644c4e85cf737a9a466771 /tests/model_fields/models.py
parent6d1ae5e27c3fe612209023bacd8a201fffedc375 (diff)
downloaddjango-4965a774074780f3e4858bcc975476f71edf2c2c.tar.gz
Removed PIL compatability layer per deprecation timeline.
refs #19934.
Diffstat (limited to 'tests/model_fields/models.py')
-rw-r--r--tests/model_fields/models.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/model_fields/models.py b/tests/model_fields/models.py
index c4e99c949a..5fe4104851 100644
--- a/tests/model_fields/models.py
+++ b/tests/model_fields/models.py
@@ -2,11 +2,9 @@ import os
import tempfile
import warnings
-from django.core.exceptions import ImproperlyConfigured
-
try:
- from django.utils.image import Image
-except ImproperlyConfigured:
+ from PIL import Image
+except ImportError:
Image = None
from django.core.files.storage import FileSystemStorage
@@ -114,7 +112,7 @@ class VerboseNameField(models.Model):
field9 = models.FileField("verbose field9", upload_to="unused")
field10 = models.FilePathField("verbose field10")
field11 = models.FloatField("verbose field11")
- # Don't want to depend on Pillow/PIL in this test
+ # Don't want to depend on Pillow in this test
#field_image = models.ImageField("verbose field")
field12 = models.IntegerField("verbose field12")
with warnings.catch_warnings(record=True) as w:
@@ -151,7 +149,7 @@ class Document(models.Model):
###############################################################################
# ImageField
-# If Pillow/PIL available, do these tests.
+# If Pillow available, do these tests.
if Image:
class TestImageFieldFile(ImageFieldFile):
"""