[Zope3-checkins]
SVN: Zope3/branches/philikon-reduce-zcml/src/zope/app/component/contentdirective.py
Make the <class><factory /></class> directive not use the now
deprecated
Philipp von Weitershausen
philikon at philikon.de
Sat Feb 25 15:50:45 EST 2006
Log message for revision 65477:
Make the <class><factory /></class> directive not use the now deprecated
top-level <factory /> directive handler.
Changed:
U Zope3/branches/philikon-reduce-zcml/src/zope/app/component/contentdirective.py
-=-
Modified: Zope3/branches/philikon-reduce-zcml/src/zope/app/component/contentdirective.py
===================================================================
--- Zope3/branches/philikon-reduce-zcml/src/zope/app/component/contentdirective.py 2006-02-25 20:49:32 UTC (rev 65476)
+++ Zope3/branches/philikon-reduce-zcml/src/zope/app/component/contentdirective.py 2006-02-25 20:50:44 UTC (rev 65477)
@@ -19,6 +19,7 @@
from types import ModuleType
from persistent.interfaces import IPersistent
+from zope.component.interfaces import IFactory
from zope.component.factory import Factory
from zope.interface import classImplements
from zope.schema.interfaces import IField
@@ -31,7 +32,7 @@
from zope.app.security.protectclass import protectLikeUnto, protectName
from zope.app.security.protectclass import protectSetAttribute
-from metaconfigure import factory
+from zope.app.component.metaconfigure import utility
PublicPermission = 'zope.Public'
@@ -171,7 +172,8 @@
# note factories are all in one pile, utilities and content,
# so addable names must also act as if they were all in the
# same namespace, despite the utilities/content division
- factory(_context, factoryObj, id, title, description)
+ utility(_context, IFactory, factoryObj,
+ permission=PublicPermission, name=id)
class LocalUtilityDirective(ContentDirective):
More information about the Zope3-Checkins
mailing list