def label_for_value(self, value):
        #key = self.rel.get_related_field().name
        if isinstance(value, DBRef):
            value = value.id
        try:
            obj = self.rel.to.objects().get(**{'pk': value})
            return '&nbsp;<strong>%s</strong>' % escape(Truncator(obj).words(14, truncate='...'))
        except (__HOLE__, self.rel.to.DoesNotExist):
            return ''
dataset/ETHPy150Open jschrewe/django-mongoadmin/mongoadmin/widgets.py/ReferenceRawIdWidget.label_for_value