[Grok-dev] directlyProvides

Darryl Cousins darryl at darrylcousins.net.nz
Mon Mar 26 04:18:04 EDT 2007


Hi,


On Mon, 2007-03-26 at 08:37 +0200, Christian Theune wrote:
> Am Montag, den 26.03.2007, 10:55 +1200 schrieb Darryl Cousins:
> > Hi,
> > 
> > I must be dense but I can't see how to use directlyProvides in grok. In
> > doctest I would do:
> > 
> > directlyProvides(IMyInterface, IContentType)
> 
> That's the spelling you can use in grok as well.
> 
> > and in zcml I would have done:
> > 
> > <interface interface=".IMyInterface"
> >            type="zope.app.content.IContentType" />
> 
> You could use that too. ;) 
> 

Cheers. I guess I wasn't too clear. :-)  I felt uncomfortable using
interface.directlyProvides at module level (should I be?) and I am
trying to avoid using zcml (Grok smash zcml!).

So after your replies I have settled on using interface.alsoProvides at
module level. I've yet to see any problems and it works as expected.

Thanks,
Darryl



More information about the Grok-dev mailing list