__browser_default__ does not let you easily return None
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope 2 |
Invalid
|
Low
|
Unassigned |
Bug Description
Browser default lets you change the default page from index_html to something more flexible. However if the page you want to return does not exist, its hard to just ask the browser to return __call__ on the folder because: returning [None,] or ['',] makes an infinite loop and returning ['__call__,] is a security error and [getattr(content, '__call__'),] is not allowed in a Script (Python) (although it would be a Python Product.
The following patch just adds one more case that might be useful if you return [], then it goes and calls the default.
Im adding it here rather than checking it in, because this is not a hugely desirable or great thing and I found a workaround for the CMF. However I thought this might be useful to leave a paper trail.
Changed in zope2: | |
status: | New → Triaged |
The zope2 project on Launchpad has been archived at the request of the Zope developers (see https:/ /answers. launchpad. net/launchpad/ +question/ 683589 and https:/ /answers. launchpad. net/launchpad/ +question/ 685285). If this bug is still relevant, please refile it at https:/ /github. com/zopefoundat ion/zope2.