コード例 #1
0
ファイル: ExtropyBase.py プロジェクト: Blaastolen/intranett
 def getExtropyParentChain(self, include_self=False):
     """Gets the containg parent chain."""
     chain = []
     for o in self.aq_chain:
         if not include_self and o is self:
             continue
         if IExtropyBase.providedBy(o):
             chain.append(o)
     return chain
コード例 #2
0
ファイル: ExtropyBase.py プロジェクト: Blaastolen/intranett
 def getExtropyParent(self, metatype=None):
     """Gets the containg parent, if it is an ExtropyBase object."""
     for o in self.aq_chain:
         if o is not self:
             if IExtropyBase.providedBy(o):
                 if metatype is None:
                     return o
                 elif hasattr(o,'meta_type') and metatype == o.meta_type:
                     return o
     return None
コード例 #3
0
ファイル: testProject.py プロジェクト: Blaastolen/intranett
 def testProjectInterface(self):
     from Products.Extropy.interfaces import IExtropyBase
     self.failUnless(IExtropyBase.providedBy(self.project))
     from Products.Extropy.interfaces import IExtropyTracking
     self.failUnless(IExtropyTracking.providedBy(self.project))