[Zope-Checkins] CVS: Zope3 - zserver.zcml:1.1.2.1 site.zcml:1.1.2.7.12.1 z3.py:1.1.2.28.14.1 startup.zcml:NONE
Jim Fulton
jim@zope.com
Sun, 2 Jun 2002 10:35:04 -0400
Update of /cvs-repository/Zope3
In directory cvs.zope.org:/tmp/cvs-serv29793
Modified Files:
Tag: Zope3InWonderland-branch
site.zcml z3.py
Added Files:
Tag: Zope3InWonderland-branch
zserver.zcml
Removed Files:
Tag: Zope3InWonderland-branch
startup.zcml
Log Message:
- Added template attribute to allow views to be created from a
template source file.
- Added beginnings of a Zope debugger. This required seperating site
and server configuration.
- Added the ability to specify a config file package in the
zopeConfigure directive. Made "config.zcml" a default for the file
attribute in the include directive.
- Fixed mapply to unwrap proxied objects. This was necessary once
views became wrapped in proxies. We need to investigate why they
weren't being wrapped before.
- I updated enough system page templates and zcml directives so that:
- Zope now starts. :)
- The root folder contents listing can be viewed.
Many more templates and zcml files need to be updated to reflect the
way views are now handled.
=== Added File Zope3/zserver.zcml ===
<zopeConfigure
xmlns="http://namespaces.zope.org/zope"
xmlns:startup="http://namespaces.zope.org/startup">
<!-- Define a specific site. The name of the site is used for server
messages only. The number of threads specifies the number of
threads the server should maximally use. -->
<startup:defineSite name="Zope 3 Default"
threads="4">
<!-- You can choose between several storages.
At the moment only two storages are supported:
FileStorage - Saves data in a specified file
MappingStorage - Saves data in a dictionary. No saving. -->
<startup:useFileStorage file = "Data.fs" />
<!--startup:useMappingStorage /-->
<!-- Setup the log file.
There are two special file names:
STDERR - sends output to standard error
STDOUT - sends output to standard output -->
<startup:useLog file="STDERR" />
<!-- Now define the servers you would like to start. All you need
to specify is the server type. Both, the port and verbose option,
are optional.
The following types are currently available:
Browser - A standard HTML/XUL server
XML-RPC - An XML-RPC server, for calling objects remotely
FTP - A server to access the ZODB via the FTP protocol
Soon:
SOAP - An SOAP server for Zope based on ZSI
The 'port' option specifies the port the server should run on of course.
The 'verbose' option specifies whether any logs should be written. If
set to false, nothing is reported. -->
<startup:addServer type = "Browser" port = "8080" />
<startup:addServer type = "XML-RPC" port = "8081" verbose="true" />
<startup:addServer type = "FTP" port = "8021" />
</startup:defineSite>
</zopeConfigure>
=== Zope3/site.zcml 1.1.2.7 => 1.1.2.7.12.1 ===
<include file="products.zcml" />
-
-<!-- Now start Zope -->
-<include file="startup.zcml" />
-
</zopeConfigure>
=== Zope3/z3.py 1.1.2.28 => 1.1.2.28.14.1 ===
import os, sys, asyncore
-# setting python paths
-program = sys.argv[0]
-here = os.path.join(os.getcwd(), os.path.split(program)[0])
-sys.path=[os.path.join(here,'lib','python'),
- here] + filter(None, sys.path)
-
-from Zope.Configuration import config
-from Zope.Configuration.xmlconfig import XMLConfig
-
-# temp hack
-config(os.getcwd())
-
-try:
- asyncore.loop()
-except KeyboardInterrupt:
- # Exit without spewing an exception.
- pass
-sys.exit(0)
+basepath = filter(None, sys.path)
+def run(argv=sys.argv):
+
+ # setting python paths
+ program = argv[0]
+ here = os.path.join(os.getcwd(), os.path.split(program)[0])
+ libpython = os.path.join(here,'lib','python')
+ sys.path=[libpython, here] + basepath
+
+ # temp hack
+ dir = os.getcwd()
+
+ from Zope.Configuration.xmlconfig import XMLConfig
+
+
+ # Load server-independent site config
+ XMLConfig(os.path.join(dir, 'site.zcml'))()
+
+ # Load server config
+ XMLConfig(os.path.join(dir, 'zserver.zcml'))()
+
+ try:
+ asyncore.loop()
+ except KeyboardInterrupt:
+ # Exit without spewing an exception.
+ pass
+ sys.exit(0)
+
+
+if __name__ == '__main__':
+ run()
+
=== Removed File Zope3/startup.zcml ===