예제 #1
0
 def __call__(self, context):
     # laboratories : attribute acquired from parent doctoral college
     terms = []
     parent = get_wellknownparent(context)
     linesstr = ''
     if IWellKnown.implementedBy(parent):
         linesstr = parent.superfield
     return make_voc(terms, linesstr)
예제 #2
0
def get_wellknownparent(context):
    parent = get_parent(context)
    plone = getSite()
    while (
        parent is not plone
        and not IWellKnown.implementedBy(parent)
        and is_zope_object(parent)
    ):
        parent = get_parent(parent)
    return parent