Is there some way to check whether an adapter exists without having something to adapt?

Specifically, I want to know if a particular view is registered for a particular type of context and request/layer, with a particular name. However, I don't have an instance of the object of that type, nor the request, at the time when I need to do the check.

I tried this, but it doesn't seem to work, at least not for globally registered views:

site_manager = getSiteManager(site)
addview_factory = site_manager.adapters.lookup((Implements(IAdding), Implements(IBrowserRequest)), IBrowserView, name=fti.factory)


Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book

Zope3-users mailing list

Reply via email to