diff --git a/configure.zcml b/configure.zcml index fab9023..16fff49 100644 --- a/configure.zcml +++ b/configure.zcml @@ -6,5 +6,6 @@ > + diff --git a/menu/configure.zcml b/menu/configure.zcml index 25e1c69..3644b1b 100644 --- a/menu/configure.zcml +++ b/menu/configure.zcml @@ -35,7 +35,7 @@ - >> nyRels[0].first == kirk True -Triedic Relations +Triadic Relations ~~~~~~~~~~~~~~~~~ We now extend our setting using a triadic relationship - triadic relations diff --git a/relation/configure.zcml b/relation/configure.zcml index 46a5426..b94bda4 100644 --- a/relation/configure.zcml +++ b/relation/configure.zcml @@ -2,17 +2,40 @@ + xmlns:browser="http://namespaces.zope.org/browser" + i18n_domain="zope"> - + + + + + + + - + - - - - + diff --git a/relation/registry.py b/relation/registry.py index fb2b14d..d248079 100644 --- a/relation/registry.py +++ b/relation/registry.py @@ -69,14 +69,18 @@ class RelationsRegistry(Catalog): implements(IRelationsRegistry) - def __init__(self, *args, **kwargs): - Catalog.__init__(self, *args, **kwargs) + indexesSetUp = False + + def setupIndexes(self): self['relationship'] = FieldIndex() self['first'] = FieldIndex() self['second'] = FieldIndex() self['third'] = FieldIndex() + self.indexesSetUp = True def register(self, relation): + if not self.indexesSetUp: + self.setupIndexes() relid = self._getUid(relation) for idx in self: index = self[idx]