Ejemplo n.º 1
0
def get_hires_image(obj, size=('180', 'auto')):
    if obj.hires_image:
        return u"%s%s" % (settings.MEDIA_URL, thumbnail_path(obj.hires_image, size))
    if isinstance(obj, Person):
        return urls.urls.get('DEFAULT_ACTOR')
    else:
        return urls.urls.get('DEFAULT_POSTER')
Ejemplo n.º 2
0
def get_hires_image(obj, size=('180', 'auto')):
    if obj.hires_image:
        return u"%s%s" % (settings.MEDIA_URL,
                          thumbnail_path(obj.hires_image, size))
    if isinstance(obj, Person):
        return urls.urls.get('DEFAULT_ACTOR')
    else:
        return urls.urls.get('DEFAULT_POSTER')
Ejemplo n.º 3
0
 def thumbnails(self):
     if self:
         return dict((size, thumbnail_path(self, size)) for size in self.field.sizes)
     else:
         return {}