def app_states(self): app = ISchoolToolApplication(None) container = IRelationshipStateContainer(app) states = container.get(self.view.app_states_name, None) if states is None: return {} return states
def app_states(self): app = ISchoolToolApplication(None) container = IRelationshipStateContainer(app) states = container.get(self.view.app_states_name, None) if states is None: return {} return states
def getVocabulary(self): app = ISchoolToolApplication(None) container = IRelationshipStateContainer(app) relationships = container.get(self.field.source) terms = [ zope.schema.vocabulary.SimpleTerm( state, token=state.__name__, title=state.title) for state in relationships.states.values()] vocabulary = zope.schema.vocabulary.SimpleVocabulary(terms) return vocabulary
def getVocabulary(self): app = ISchoolToolApplication(None) container = IRelationshipStateContainer(app) relationships = container.get(self.field.source) terms = [ zope.schema.vocabulary.SimpleTerm(state, token=state.__name__, title=state.title) for state in relationships.states.values() ] vocabulary = zope.schema.vocabulary.SimpleVocabulary(terms) return vocabulary
def states(self): if self.app_states_name is None: return None app = ISchoolToolApplication(None) container = IRelationshipStateContainer(app) return container.get(self.app_states_name, None)
def states(self): if self.app_states_name is None: return None app = ISchoolToolApplication(None) container = IRelationshipStateContainer(app) return container.get(self.app_states_name, None)