[Zope-dev] SVN: zope.traversing/trunk/ zcml now only depends on zope.component meta, not zope.app.component

Marius Gedminas marius at gedmin.as
Thu Apr 2 18:37:36 EDT 2009


On Thu, Apr 02, 2009 at 01:08:51PM -0400, Tres Seaver wrote:
> Gary Poster wrote:
> > Log message for revision 98787:
> >   zcml now only depends on zope.component meta, not zope.app.component
> > 
> > Changed:
> >   U   zope.traversing/trunk/CHANGES.txt
> >   U   zope.traversing/trunk/src/zope/traversing/configure.zcml
> >   A   zope.traversing/trunk/src/zope/traversing/tests/ftest_zcml_dependencies.zcml
> >   A   zope.traversing/trunk/src/zope/traversing/tests/test_dependencies.py
> > 
> > -=-
> > Modified: zope.traversing/trunk/CHANGES.txt
> > ===================================================================
> > --- zope.traversing/trunk/CHANGES.txt	2009-04-02 02:22:07 UTC (rev 98786)
> > +++ zope.traversing/trunk/CHANGES.txt	2009-04-02 06:46:52 UTC (rev 98787)
> > @@ -5,7 +5,7 @@
> >  3.5.4 (unreleased)
> >  ------------------
> >  
> > -- ...
> > +- Change configure.zcml to not depend on zope.app.component.
> >  
> >  3.5.3 (2009-03-10)
> >  ------------------
> > 
> > Modified: zope.traversing/trunk/src/zope/traversing/configure.zcml
> > ===================================================================
> > --- zope.traversing/trunk/src/zope/traversing/configure.zcml	2009-04-02 02:22:07 UTC (rev 98786)
> > +++ zope.traversing/trunk/src/zope/traversing/configure.zcml	2009-04-02 06:46:52 UTC (rev 98787)
> > @@ -16,10 +16,10 @@
> >      provides="zope.traversing.interfaces.ITraversable" for="*"
> >      factory="zope.traversing.namespace.etc"
> >      />
> > -<view
> > +<adapter
> >      name="etc"
> > -    type="zope.interface.Interface"
> > -    provides="zope.traversing.interfaces.ITraversable" for="*"
> > +    for="* zope.publisher.interfaces.IRequest"
> > +    provides="zope.traversing.interfaces.ITraversable"
> >      factory="zope.traversing.namespace.etc"
> >      />
> > ...
> 
> Excellent fix.

*applause*

Incidentally, I've a long-standing wish to be able to register browser
views in ZCML using the adapter directive.

    class MyFineView(BrowserPage):
        adapts(IMyContentObject, IBrowserRequest)

        template = ViewPageTemplateFile('my_fine_view.pt')

        def __call__(self):
            # update form or whatever
            return self.template()

    <adapter name="my_fine_view.html" factory=".mod.MyFineView" />

Maybe something to look for in Zope 4?

Marius Gedminas
-- 
http://pov.lt/ -- Zope 3 consulting and development
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20090403/21aa2fea/attachment.bin 


More information about the Zope-Dev mailing list