コード例 #1
0
ファイル: PloneboardForum.py プロジェクト: a25kk/stv2
    def getBoard(self):
        """Returns containing or nearest board."""
        # Try containment
        stoptypes = ['Plone Site']
        for obj in aq_chain(aq_inner(self)):
            if hasattr(obj, 'portal_type') and obj.portal_type not in stoptypes:
                if IPloneboard.providedBy(obj):
                    return obj

        return None
コード例 #2
0
    def getBoard(self):
        """Returns containing or nearest board."""
        # Try containment
        stoptypes = ['Plone Site']
        for obj in aq_chain(aq_inner(self)):
            if hasattr(obj, 'portal_type') and obj.portal_type not in stoptypes:
                if IPloneboard.providedBy(obj):
                    return obj

        return None
コード例 #3
0
 def testInterfaceConformance(self):
     self.failUnless(IPloneboard.providedBy(self.board))
     self.failUnless(verifyObject(IPloneboard, self.board))