[Zope-Checkins] CVS: Zope3/lib/python/Zope/App - config.py:1.1.2.4
Jim Fulton
jim@zope.com
Tue, 20 Nov 2001 14:59:17 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App
In directory cvs.zope.org:/tmp/cvs-serv29117
Modified Files:
Tag: Zope-3x-branch
config.py
Log Message:
Added include directive.
=== Zope3/lib/python/Zope/App/config.py 1.1.2.3 => 1.1.2.4 ===
import os
from Zope.Configuration.xmlconfig import xmlconfig
+from Zope.Configuration.meta import register
+from Zope.Configuration import namespace
def config(dir):
from Zope.ComponentArchitecture.metaConfigure import metaConfigure
@@ -21,6 +23,12 @@
metaConfigure()
from Zope.App.Security.metaConfigure import metaConfigure
metaConfigure()
+
+ def config_file(file):
+ file=open(os.path.join(dir, file))
+ xmlconfig(file)
+
+ register(namespace('zope'), 'include', config_file)
file=open(os.path.join(dir, 'zope.zcml'))
xmlconfig(file)