本文整理匯總了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