Derek Richardson wrote:
zope 2.10.4
plone 3.0.5
getToolByName(ctx, 'kupu_library_tool') gives an Attribute error because
it can't find the kupu_library_tool. yet i can see it in my zmi. any
ideas why? this code is running in an initialize() for a product.
Just for clarification: you mean the 'initialize' in __init__.py
that's executed on startup? There the context is the top-level
Zope application ('app' in zopectl debug) which doesn't know
anything about any Plone sites. Maybe that's your problem?
Raphael
I've
stepped through getToolByName and see that it's not found, but don't
have the skills to dig into the C code behind aq_get(). :(
from Products.CMFCore import utils
# ... lines pass ...
kupuTool = utils.getToolByName(context, 'kupu_library_tool')
Thanks!
Derek
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers