[z3-five] (re)using zpt macros from view page templates

Philipp von Weitershausen philipp at weitershausen.de
Tue Jan 30 20:02:50 CET 2007


On 30 Jan 2007, at 19:55 , Chris Withers wrote:
> Philipp von Weitershausen wrote:
>>>> from Products.Five.browser.pagetemplatefile import  
>>>> ViewPageTemplateFile
>>>
>>> This was my mistake, that should have been:
>>>
>>> from Products.Five.browser.pagetemplatefile import \
>>>      ZopeTwoPageTemplateFile
>> They're the same. It shouldn't make a difference.
>
> No, they're not...
>
> Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
>
> ...just imports ViewPageTemplateFile from there, it's origin, if  
> you read pagetemplatefile.py is:
>
> from zope.app.pagetemplate.viewpagetemplatefile import \
>     ViewPageTemplateFile
>
> ...and it appears to be a total red herring, since it's not  
> actually used anywhere inside pagetemplatefile.py :-(

Aaah. In more recent Five versions, I aliased ZopeTwoPageTemplateFile  
(what a stupid name) to ViewPageTemplateFile.

> Maybe it could get removed?

Aaah, yes, the unused import should be removed.






More information about the z3-five mailing list