예제 #1
0
def code_source_source(context):
    terms = []
    for identifier, _ in availableSources(context.get_root()):
        terms.append(SimpleTerm(value=identifier,
                                title=identifier,
                                token=identifier))
    return SimpleVocabulary(terms)
예제 #2
0
 def get_all(self):
     for identifier, source in availableSources(self.context):
         yield SourceBlockConfiguration(self.prefix, source, self.block)