Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #8187: made PIL imports consistant. Thanks, bastih.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8257 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 750f5c8d464f79a5b502cf67b42e59196dc92742 1 parent 6a06db0
Jacob Kaplan-Moss authored August 09, 2008
2  tests/modeltests/model_forms/models.py
@@ -75,7 +75,7 @@ class ImageFile(models.Model):
75 75
         # Checking for the existence of Image is enough for CPython, but
76 76
         # for PyPy, you need to check for the underlying modules
77 77
         # If PIL is not available, this test is equivalent to TextFile above.
78  
-        import Image, _imaging
  78
+        from PIL import Image, _imaging
79 79
         image = models.ImageField(storage=temp_storage, upload_to='tests')
80 80
     except ImportError:
81 81
         image = models.FileField(storage=temp_storage, upload_to='tests')
2  tests/regressiontests/file_storage/models.py
@@ -12,7 +12,7 @@
12 12
 try:
13 13
     # Checking for the existence of Image is enough for CPython, but
14 14
     # for PyPy, you need to check for the underlying modules
15  
-    import Image, _imaging
  15
+    from PIL import Image, _imaging
16 16
 except ImportError:
17 17
     Image = None
18 18
 

0 notes on commit 750f5c8

Please sign in to comment.
Something went wrong with that request. Please try again.