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