コード例 #1
0
ファイル: DirectoryView.py プロジェクト: bendavis78/zope
 def getCustomizableObject(self):
     ob = aq_parent(aq_inner(self))
     while ob:
         if IDirectoryView.providedBy(ob):
             ob = aq_parent(ob)
         else:
             break
     return ob
コード例 #2
0
ファイル: to21.py プロジェクト: bendavis78/zope
def check_skins_tool(tool):
    """2.0.x to 2.1.0 upgrade step checker
    """
    stool = getToolByName(tool, 'portal_skins')
    for obj in stool.objectValues():
        if IDirectoryView.providedBy(obj):
            dirpath = obj.getDirPath()
            if dirpath is None:
                continue
            if dirpath not in _dirreg.listDirectories():
                return True
    return False
コード例 #3
0
ファイル: to21.py プロジェクト: nacho22martin/tesis
def check_skins_tool(tool):
    """2.0.x to 2.1.0 upgrade step checker
    """
    stool = getToolByName(tool, 'portal_skins')
    for obj in stool.objectValues():
        if IDirectoryView.providedBy(obj):
            dirpath = obj.getDirPath()
            if dirpath is None:
                continue
            if dirpath not in _dirreg.listDirectories():
                return True
    return False
コード例 #4
0
ファイル: to21.py プロジェクト: bendavis78/zope
def upgrade_skins_tool(tool):
    """2.0.x to 2.1.0 upgrade step handler
    """
    logger = logging.getLogger('GenericSetup.upgrade')
    stool = getToolByName(tool, 'portal_skins')
    for obj in stool.objectValues():
        if IDirectoryView.providedBy(obj):
            dirpath = obj.getDirPath()
            if dirpath is None:
                continue
            if dirpath not in _dirreg.listDirectories():
                obj._dirpath = _getCurrentKeyFormat(dirpath)
                logger.info("DirectoryView '%s' changed." % obj.getId())
コード例 #5
0
ファイル: to21.py プロジェクト: nacho22martin/tesis
def upgrade_skins_tool(tool):
    """2.0.x to 2.1.0 upgrade step handler
    """
    logger = logging.getLogger('GenericSetup.upgrade')
    stool = getToolByName(tool, 'portal_skins')
    for obj in stool.objectValues():
        if IDirectoryView.providedBy(obj):
            dirpath = obj.getDirPath()
            if dirpath is None:
                continue
            if dirpath not in _dirreg.listDirectories():
                obj._dirpath = _getCurrentKeyFormat(dirpath)
                logger.info("DirectoryView '%s' changed." % obj.getId())
コード例 #6
0
ファイル: DirectoryView.py プロジェクト: c0ns0le/zenoss-4
 def getCustomizableObject(self):
     ob = aq_parent(aq_inner(self))
     while ob:
         if IDirectoryView.providedBy(ob):
             ob = aq_parent(ob)
         elif getattr(ob, '_isDirectoryView', 0):
             # BBB
             warn("The '_isDirectoryView' marker attribute is deprecated, "
                  "and will be removed in CMF 2.3.  Please mark the "
                  "instance with the 'IDirectoryView' interface instead.",
                  DeprecationWarning, stacklevel=2)
             ob = aq_parent(ob)
         else:
             break
     return ob
コード例 #7
0
ファイル: DirectoryView.py プロジェクト: goschtl/zope
 def getCustomizableObject(self):
     ob = aq_parent(aq_inner(self))
     while ob:
         if IDirectoryView.providedBy(ob):
             ob = aq_parent(ob)
         elif getattr(ob, '_isDirectoryView', 0):
             # BBB
             warn("The '_isDirectoryView' marker attribute is deprecated, "
                  "and will be removed in CMF 2.3.  Please mark the "
                  "instance with the 'IDirectoryView' interface instead.",
                  DeprecationWarning, stacklevel=2)
             ob = aq_parent(ob)
         else:
             break
     return ob