def parent_resources(cls):
        """Get a list of parent resources, starting from the Document"""
        parent = cls.parent_resource
        parents = [parent]

        try:
            while True:
                parent = parent.parent_resource
                parents.append(parent)
        except AttributeError:
            pass

        parents.reverse()
        return parents
Get a list of parent resources, starting from the Document