[ZCM] [ZC] 2264/ 2 Comment "Five: browser:view should set __name__"
"Collector: Zope Bugs, Features, and Patches ..." <[email protected]>
| Newsgroups | gmane.comp.web.zope.devel.collector-monitor |
|---|---|
| Message-ID | <[email protected]> |
Issue #2264 Update (Comment) "Five: browser:view should set __name__" Status Pending, Zope/bug medium To followup, visit: http://www.zope.org/Collectors/Zope/2264 ============================================================== = Comment - Entry #2 by philikon on Jan 12, 2007 9:31 am 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 :). ________________________________________ = Request - Entry #1 by mj on Jan 12, 2007 4:55 am 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.Five.BrowserView-based view class can never be rendered without it setting __name__ explicitly (or implementing getPhysicalPath). ==============================================================