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 image:
                label.append(
                    '<br /><img src="%s" alt="" style="margin:1em 0 0 10em"'
                    '/>' % image)

            return ''.join(label)
        except (__HOLE__, self.rel.to.DoesNotExist):
            return ''
dataset/ETHPy150Open feincms/feincms/feincms/module/medialibrary/fields.py/MediaFileForeignKeyRawIdWidget.label_for_value