Closed thundersystems closed 8 years ago
Hi, I've a problem with _getthumbnail method. The scenario is as follows:
models.py:
class MyModel(models.Model): header_banner_image = models.ImageField( blank=True, null=True, upload_to=get_upload_to, verbose_name=_('header banner image'), ) # size is "width x height" header_banner_image_cropping = ImageRatioField('header_banner_image', '728x90') def get_header_banner_image_cropped(self): return get_thumbnailer( self.header_banner_image ).get_thumbnail({ 'size': (728, 90), 'box': self.header_banner_image_cropped, 'crop': True, 'detail': True, }).url
my script:
iet = MyModels.objects.get(pk=4) iet.get_header_banner_image_cropped()
Even if I change the cropping box in the admin, the _get_header_banner_imagecropped function it always returns the same cropping.
Looks like a typo: 'box': self.header_banner_image_cropped, should probably be 'box': self.header_banner_image_cropping,
'box': self.header_banner_image_cropped,
'box': self.header_banner_image_cropping,
Hi, I've a problem with _getthumbnail method. The scenario is as follows:
models.py:
my script:
Even if I change the cropping box in the admin, the _get_header_banner_imagecropped function it always returns the same cropping.