简体   繁体   中英

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

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"

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM