Commits

Klaus Laube committed 70bf3bc

Atualização do django-imagekit

  • Participants
  • Parent commits 5c3e4b8
  • Tags 1.6

Comments (0)

Files changed (2)

File klauslaube/apps/portfolio/models.py

 
 if settings.HAS_IMAGEKIT_SUPPORT:
     from imagekit.models import ImageSpec
-    from imagekit.processors import resize
+    from imagekit import processors
 
 
 class Customer(models.Model):
 
     if settings.HAS_IMAGEKIT_SUPPORT:
         thumbnail = ImageSpec(
-            [resize.Crop(settings.THUMB_WIDTH, settings.THUMB_HEIGHT), ],
+            [processors.Crop(settings.THUMB_WIDTH, settings.THUMB_HEIGHT, x=0,
+                y=0), ],
             format='JPEG',
             image_field='sample_image',
+            options={'quality': 90},
         )
         formatted_image = ImageSpec(
-            [resize.Fit(settings.FORMATTED_WIDTH,
+            [processors.ResizeToFit(settings.FORMATTED_WIDTH,
                 settings.FORMATTED_HEIGHT), ],
             format='JPEG',
             image_field='sample_image',
+            options={'quality': 90},
         )
 
     # Meta

File klauslaube/requirements/base.txt

 distribute==0.6.19
 ez-setup==0.9
 django-compressor==1.1.1
-django-imagekit==1.1.0
+django-imagekit==2.0.1
 django-tagging==0.3.1
 django-simple-contact==0.0.1
 django-simple-links==0.1.0