

def label_for_value(self, value):
    key = self.rel.get_related_field().name
    try:
        obj = self.rel.to._default_manager.using(self.db).get(**{
            key: value,
        })
        label = [('&nbsp;<strong>%s</strong>' % escape(shorten_string(six.text_type(obj))))]
        image = admin_thumbnail(obj)
        if obj:
            label.append(('<br /><img src="%s" alt="" style="margin:1em 0 0 10em"/>' % image))
        return ''.join(label)
    except (ValueError, self.rel.to.DoesNotExist):
        return ''

dataset/ETHPy150Open feincms/feincms/feincms/module/medialibrary/fields.py MediaFileForeignKeyRawIdWidget.label_for_value/VarMisuse@87/108 `image`->`obj`