[Zope3-dev] ZCML alternative

Jim Fulton jim@zope.com
Sun, 02 Jun 2002 12:10:57 -0400


Itamar Shtull-Trauring wrote:
> 
> Jim Fulton wrote:
> 
> > The answer for this is simple. All that needs to be changed is to move
> >
> >   <include file="startup.zcml" />
> >
> > out of site.zcml and to have z3.py execute startup.zcml, which should
> > be renamed "zserver.zcml". I just checked this change int into the
> > "Zope3InWonderland-branch", which, I hope, will get merged into the main
> > branch next week.
> 
> I need to get the Publication object I'm supposed to be publishing, so I
> can connect it to my HTTP server. How do I do that? Where does the ZCML
> create this object? That was my problem, IIRC.

See 

http://cvs.zope.org/Zope3/lib/python/Zope/App/ZopePublication/Browser/Attic/Debug.py?only_with_tag=Zope3InWonderland-branch

for an example. 

Note that you have to use separate publication and request objects
for different protocols/interfaces (e.g. Browser, FTP, XML-RPC, etc.).

Jim

--
Jim Fulton           mailto:jim@zope.com       Python Powered!        
CTO                  (888) 344-4332            http://www.python.org  
Zope Corporation     http://www.zope.com       http://www.zope.org