當前位置: 首頁>>代碼示例>>Python>>正文


Python ObjectManager.inheritedAttribute方法代碼示例

本文整理匯總了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__
開發者ID:dtgit,項目名稱:dtedu,代碼行數:33,代碼來源:Skinnable.py


注:本文中的OFS.ObjectManager.ObjectManager.inheritedAttribute方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。