Five: browser:view should set __name__
Bug #143857 reported by
Martijn Pieters
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope 2 |
Fix Released
|
Medium
|
Philipp von Weitershausen |
Bug Description
In Zope3, browser:view sets __name__ on the generated class to the name of the view; after all it is a ILocation implementation. The Zope2/Five implementation of the directive omits this. However, Zope2's recordMetaData depends on either __name__ being set, or getPhysicalPath being available, so a plain Products.
To post a comment you must log in.
Thanks for the report. You're right, browser:view doesn't seem to do this, though browser:page does. Perhaps you could round up a simple unit test (crafted after the ones in Five/browser/tests) and provide a fix along with it. The browser:page implementation in Five/browser/ metaconfigure. py should provide enough inspiration :).