[Zope3-checkins] SVN: Zope3/trunk/src/zope/configuration/config.py
Let the stackitem factories keep track of the directive
schema, which
Stephan Richter
srichter at cosmos.phy.tufts.edu
Sat Feb 26 09:13:49 EST 2005
Log message for revision 29308:
Let the stackitem factories keep track of the directive schema, which
makes it possible to reuse this code in other scenarios.
Changed:
U Zope3/trunk/src/zope/configuration/config.py
-=-
Modified: Zope3/trunk/src/zope/configuration/config.py
===================================================================
--- Zope3/trunk/src/zope/configuration/config.py 2005-02-26 14:12:52 UTC (rev 29307)
+++ Zope3/trunk/src/zope/configuration/config.py 2005-02-26 14:13:49 UTC (rev 29308)
@@ -1133,6 +1133,7 @@
def factory(context, data, info):
return SimpleStackItem(context, handler, info, schema, data)
+ factory.schema = schema
context.register(usedIn, name, factory)
context.document(name, schema, usedIn, handler, context.info)
@@ -1192,6 +1193,7 @@
newcontext = handler(context, **args)
newcontext.info = info
return GroupingStackItem(newcontext)
+ factory.schema = schema
context.register(usedIn, name, factory)
context.document(name, schema, usedIn, handler, context.info)
@@ -1212,6 +1214,7 @@
def factory(context, data, info):
return ComplexStackItem(self, context, data, info)
+ factory.schema = self.schema
self.register(self.usedIn, (self.namespace, self.name), factory)
self.document((self.namespace, self.name), self.schema, self.usedIn,
More information about the Zope3-Checkins
mailing list