Esempio n. 1
0
def lineage(item):
    while item is not None:
        yield item
        try:
            item = item.__parent__
        except AttributeError:
            # We try an adaptation. If it fails, this time, we let it
            # bubble up.
            item = ILocation(item)
            item = item.__parent__
Esempio n. 2
0
def get_name(context):
    """Get context name"""
    return ILocation(context).__name__