

def path_list(self):
    if (self.parent is None):
        return [self]
    p = self.parent.path_list()
    p.append(self)
    return p

dataset/ETHPy150Open feincms/feincms/feincms/module/medialibrary/models.py Category.path_list/original