[Zope3-dev] RFC: abolishing python: expressions in ZPT TALES

Jim Fulton jim at zope.com
Wed Dec 28 11:04:09 EST 2005


Rocky Burt wrote:
> Hi all,
> 
> Please don't mistake this as a proposal or anything of the sort but I
> was just curious what the rest of the zope3 community thought on this
> particular topic.  (Please forgive me if this topic has been exhaused to
> death already)
> 
> Its my personal opinion that anytime a page template requires logic
> complicated enough to warrant using a 'python:' expression, that logic
> should be re-thought and placed into a view class.  I know that some
> python: expressions are fairly simple, but for an HTML designer, *any*
> python: portions are dangerous to touch (and shouldn't be touched by the
> HTML designer).
> 
> What do you all think?

+1

Views make it much easier to keep Python code in Python modules.

python expressions should be strongly discouraged in ZPT, IMO.

Jim

-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org


More information about the Zope3-dev mailing list