def obj2unicode(i):
    if not isinstance(i, models.Model):
        return str(i)
    return '%s "%s"' % (i._meta.verbose_name, str(i))
Returns a user-friendly unicode representation of a model instance.
dataset/ETHPy150Open lsaffre/lino/lino/core/utils.py/obj2unicode