本文整理汇总了Python中plone.folder.ordered.CMFOrderedBTreeFolderBase._getOb方法的典型用法代码示例。如果您正苦于以下问题:Python CMFOrderedBTreeFolderBase._getOb方法的具体用法?Python CMFOrderedBTreeFolderBase._getOb怎么用?Python CMFOrderedBTreeFolderBase._getOb使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类plone.folder.ordered.CMFOrderedBTreeFolderBase
的用法示例。
在下文中一共展示了CMFOrderedBTreeFolderBase._getOb方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _getOb
# 需要导入模块: from plone.folder.ordered import CMFOrderedBTreeFolderBase [as 别名]
# 或者: from plone.folder.ordered.CMFOrderedBTreeFolderBase import _getOb [as 别名]
def _getOb(self, id, default=_marker):
if self._aliasTraversal:
aliased = self._target
if aliased is not None:
obj = aliased._getOb(id, default)
if obj is default:
if default is _marker:
raise KeyError(id)
return default
return aq_base(obj).__of__(self)
return CMFOrderedBTreeFolderBase._getOb(self, id, default)
示例2: _getOb
# 需要导入模块: from plone.folder.ordered import CMFOrderedBTreeFolderBase [as 别名]
# 或者: from plone.folder.ordered.CMFOrderedBTreeFolderBase import _getOb [as 别名]
def _getOb(self, item_id, default=_marker):
obj = CMFOrderedBTreeFolderBase._getOb(self, item_id, default)
if obj is not default:
return obj
aliased = getSite()
if aliased and item_id not in BLACK_LIST_IDS:
obj = aliased._getOb(item_id, default)
if obj is default:
return default
new_object = aq_base(obj).__of__(self)
new_object._v_is_shared_content = True
return new_object
if default is not _marker:
return default
示例3: _getOb
# 需要导入模块: from plone.folder.ordered import CMFOrderedBTreeFolderBase [as 别名]
# 或者: from plone.folder.ordered.CMFOrderedBTreeFolderBase import _getOb [as 别名]
def _getOb(self, id, default=_marker):
obj = CMFOrderedBTreeFolderBase._getOb(self, id, default)
if obj is not default:
return obj
else:
aliased = getSite()
if aliased:
if (id not in _languagelist and id not in _combinedlanguagelist):
obj = aliased._getOb(id, default)
if obj is default:
# if default is _marker:
# raise KeyError
return default
new_object = aq_base(obj).__of__(self)
new_object._v_is_shared_content = True
return new_object