

@property
def right_dict(self):
    key = (self._cache_prefix + str(self.pk))
    cache = type(self)._dict_cache
    if (key not in cache):
        from wq.db.rest.models import get_object_id, get_ct
        obj = self.right
        oid = get_object_id(obj)
        ct = get_ct(obj)
        cache[key] = {
            'item_id': get_object_id(obj),
            'item_label': str(obj),
            'item_url': ('%s/%s' % (ct.urlbase, oid)),
            'item_page': ct.identifier,
        }
    return cache[key]

dataset/ETHPy150Open wq/wq.db/patterns/relate/models.py Relationship.right_dict/original