本文整理汇总了Python中OFS.ObjectManager.ObjectManager.inheritedAttribute方法的典型用法代码示例。如果您正苦于以下问题:Python ObjectManager.inheritedAttribute方法的具体用法?Python ObjectManager.inheritedAttribute怎么用?Python ObjectManager.inheritedAttribute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OFS.ObjectManager.ObjectManager
的用法示例。
在下文中一共展示了ObjectManager.inheritedAttribute方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from OFS.ObjectManager import ObjectManager [as 别名]
# 或者: from OFS.ObjectManager.ObjectManager import inheritedAttribute [as 别名]
from AccessControl import ClassSecurityInfo
from Acquisition import aq_base
from Globals import InitializeClass
from OFS.ObjectManager import ObjectManager
from ZODB.POSException import ConflictError
logger = logging.getLogger('CMFCore.Skinnable')
# superGetAttr is assigned to whatever ObjectManager.__getattr__
# used to do.
try:
superGetAttr = ObjectManager.__getattr__
except AttributeError:
try:
superGetAttr = ObjectManager.inheritedAttribute('__getattr__')
except AttributeError:
superGetAttr = None
_MARKER = object() # Create a new marker object.
SKINDATA = {} # mapping thread-id -> (skinobj, skinname, ignore, resolve)
class SkinDataCleanup:
"""Cleanup at the end of the request."""
def __init__(self, tid):
self.tid = tid
def __del__(self):
tid = self.tid
# Be extra careful in __del__