def ald_image(self, obj): """ Image thumbnail for admin list_display option. """ if not obj.image: img_thumb = thumbnail(obj.category.image, '45,0') thumb = '<div class="default-illustration"><img src="%s" alt="%s" /></div>' % (img_thumb, obj.category.image_legend) else: img_thumb = thumbnail(obj.image, '45,0') thumb = '<img src="%s" alt="%s" />' % (img_thumb, obj.image_legend) return thumb
def ald_image(self, obj): """ Image thumbnail for admin list_display option. """ img_thumb = thumbnail(obj.image, "45,0") return '<img src="%s" alt="%s" />' % (img_thumb, obj.legend)