[Zope-CMF] Re: Tools as local utilities

Jens Vagelpohl jens at dataflake.org
Sun Nov 19 11:46:04 EST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On 19 Nov 2006, at 17:39, Rocky Burt wrote:
>> +    tool = getUtility(IActionsTool, context=site)
>
> This looks like it will be the new way of looking up CMF tools?  Looks
> great.  But we shouldn't have to specify ``context=site`` should we?
> getUtility should automatically figure out what the nearest chain of
> sites should be and look for local utilities in each one of them
> automatically no?

Well, I get ComponentLookupErrors in this specific case when I don't  
pass the context :/  Mind you, this could be a result of how the  
tests are set up.

I'm hoping to finish it off (specifying the context only where I have  
to), put it out there for everyone to look at, and gather suggestions  
for improvemements then.

jens


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFFYIpMRAx5nvEhZLIRAlAMAJwPzFh9rkiQD27XNq/p2TqdFYn6SwCfRXAS
3JKcWaEushYAfVuo7gDubL0=
=iTg+
-----END PGP SIGNATURE-----


More information about the Zope-CMF mailing list