예제 #1
0
 def medium_image_admin(self):
     url = get_thumbnailer(self.image_original).get_thumbnail({
         'size':
         (GALLERY_IMAGE_MEDIUM[:GALLERY_IMAGE_MEDIUM.index('x')],
          GALLERY_IMAGE_MEDIUM[GALLERY_IMAGE_MEDIUM.index('x') + 1:]),
         'box':
         self.cropping_medium,
         'crop':
         True,
         'detail':
         True,
     }).url
     return str.format('<img src={0} width=100 />', url)
예제 #2
0
 def medium_image(self):
     url = get_thumbnailer(self.image_original).get_thumbnail({
         'size':
         (GALLERY_IMAGE_MEDIUM[:GALLERY_IMAGE_MEDIUM.index('x')],
          GALLERY_IMAGE_MEDIUM[GALLERY_IMAGE_MEDIUM.index('x') + 1:]),
         'box':
         self.cropping_medium,
         'crop':
         True,
         'detail':
         True,
     }).url
     return url
예제 #3
0
 def medium_image_admin(self):
     url = (
         get_thumbnailer(self.image_original)
         .get_thumbnail(
             {
                 "size": (
                     GALLERY_IMAGE_MEDIUM[: GALLERY_IMAGE_MEDIUM.index("x")],
                     GALLERY_IMAGE_MEDIUM[GALLERY_IMAGE_MEDIUM.index("x") + 1 :],
                 ),
                 "box": self.cropping_medium,
                 "crop": True,
                 "detail": True,
             }
         )
         .url
     )
     return str.format("<img src={0} width=100 />", url)
예제 #4
0
 def medium_image(self):
     url = (
         get_thumbnailer(self.image_original)
         .get_thumbnail(
             {
                 "size": (
                     GALLERY_IMAGE_MEDIUM[: GALLERY_IMAGE_MEDIUM.index("x")],
                     GALLERY_IMAGE_MEDIUM[GALLERY_IMAGE_MEDIUM.index("x") + 1 :],
                 ),
                 "box": self.cropping_medium,
                 "crop": True,
                 "detail": True,
             }
         )
         .url
     )
     return url