[Zope3-checkins] CVS: Zope3/src/zope/app - _app.py:1.14.2.1

Jim Fulton jim at zope.com
Mon Aug 4 12:34:13 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app
In directory cvs.zope.org:/tmp/cvs-serv25992/src/zope/app

Modified Files:
      Tag: zcml-interface-field-branch
	_app.py 
Log Message:
Changed to use the new application-server configuration context that
provides access to services.


=== Zope3/src/zope/app/_app.py 1.14 => 1.14.2.1 ===
--- Zope3/src/zope/app/_app.py:1.14	Mon Aug  4 07:11:27 2003
+++ Zope3/src/zope/app/_app.py	Mon Aug  4 11:34:08 2003
@@ -21,6 +21,9 @@
 from zope.publisher.publish import publish as _publish, debug_call
 from zope.publisher.browser import TestRequest
 from zope.app.publication.browser import BrowserPublication
+import zope.configuration.xmlconfig
+import zope.component.service
+
 
 __metaclass__ = type
 
@@ -32,7 +35,7 @@
     if _configured:
         return
 
-    from zope.configuration import xmlconfig
+    import zope.app.configuration
 
     # Set user to system_user, so we can do anything we want
     from zope.security.management import system_user
@@ -40,7 +43,10 @@
     newSecurityManager(system_user)
 
     # Load server-independent site config
-    context = xmlconfig.file(file, execute=execute)
+    sm = zope.component.service.serviceManager
+    context = zope.app.configuration.ConfigurationMachine(sm)
+    zope.configuration.xmlconfig.registerCommonDirectives(context)
+    zope.configuration.xmlconfig.file(file, context=context, execute=execute)
 
     # Reset user
     from zope.security.management import noSecurityManager




More information about the Zope3-Checkins mailing list