[Zope-dev] Re: default view
Lennart Regebro
regebro at gmail.com
Sun Jun 18 14:15:58 EDT 2006
On 6/18/06, Philipp von Weitershausen <philipp at weitershausen.de> wrote:
> > The remaining important question is: if a *default* view is specified
> > using the zope 3 mechanism, should we always treat it as a zope 3 view,
> > and refuse to lookup an attribute with that name?
>
> Yep. browser:defaultView should only affect the view machinery.
OK, that means that the test in Five.browser.tests.test_defaultview
lin 94 iw wrong, as it explicitly tests that they CAN be attributes.
;)
This tests whether an existing ``index_html`` method is still
supported and called:
>>> print http(r'''
... GET /test_folder_1_/testindex HTTP/1.1
... ''')
HTTP/1.1 200 OK
...
Default index_html called
>From Five.browser.tests.defaultview.zcml:
<browser:defaultView
for="Products.Five.tests.testing.simplecontent.IIndexSimpleContent"
name="index_html"
/>
If you want to have non-views as browser default, we still need to use
__browser_default__, then.
The option is to allow attributes, and specify the browserdefault with
@@ to force it to be a view.
--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
More information about the Zope-Dev
mailing list