Can zope.publisher.browser.BrowserView be used in Plone?

188 views Asked by At

Given that Products.Five is an integration layer to make the Zope Component Architecture (ZCA) usable in Plone:

  • Is it possible to use zope.publisher.browser in Plone or do I have to use Products.Five.browser to import BrowserView?

The former produces a traceback:

2015-06-04 14:47:02 ERROR Zope.SiteErrorLog 1433443622.720.549321919726 http://localhost:8080/Plone/@@hello Traceback (innermost last): Module ZPublisher.Publish, line 138, in publish Module ZPublisher.mapply, line 77, in mapply Module ZPublisher.Publish, line 48, in call_object Module zope.publisher.browser, line 968, in __call__ NotImplementedError: Subclasses should override __call__ to provide a response body

Whereas the latter "just works"

1

There are 1 answers

3
Godefroid Chapelle On BEST ANSWER

You need to use Products.Five.browser.BrowserView because it is in charge of plugging the view in Acquisition, hence (among others) in Zope 2 security infrastructure.

It inherits from AcquisitionBBB.

Zope 2 security relies on acquisition to configure permissions only at root of content trees.