Beispiel #1
0
 def get_image_thumbnail_url(self, size=(500, 275)):
     return image_thumbnail_url(self.image, size)
Beispiel #2
0
 def prepare_background_image_large_url(self, obj):
     """ This should not be overridden """
     image = self.get_image_field_for_background(obj)
     if image and isinstance(image, six.string_types):
         return image
     return image_thumbnail_url(image, (1000, 350))
Beispiel #3
0
 def prepare_icon_image_url(self, obj):
     """ This should not be overridden """
     image = self.get_image_field_for_icon(obj)
     if image and isinstance(image, six.string_types):
         return image
     return image_thumbnail_url(image, (144, 144))
Beispiel #4
0
 def get_avatar_thumbnail_url(self, size=(80, 80)):
     return image_thumbnail_url(self.avatar,
                                size) or static('images/jane-doe-small.png')
 def get_image_thumbnail_url(self, size=(0, 80)):
     return image_thumbnail_url(self.image, size)
Beispiel #6
0
 def get_image_url(self, obj):
     image_file = obj.attached_image.file if obj.attached_image else None
     if image_file:
         return image_thumbnail_url(image_file, (466, 112))
     return static('images/conference-event-placeholder.png')