[ZPT] v2 of Path Prefixes in CVS

Fergal Daly fergal at esatclear.ie
Tue Sep 2 17:43:05 EDT 2003


On Tuesday 02 September 2003 15:55, Shane Hathaway wrote:
> I see it as a way to be explicit about things we have been doing 
> implicitly.  "path/mytemplate" is vulnerable to acquiring something 
> other than a template if some other thing happens to be named 
> "mytemplate".  But let's say you write a prefix called "templates" that 
> acquires only templates.  "path/templates:mytemplate" would then let you 
> be sure that you're acquiring a template.

Penny is dropping, this all comes down to acquisition. I had assumed that 
acquisition was something that had been implemented at the python class level 
but, correct me if I'm wrong, acquisition is handled at the TALES level and 
this is to allow namespacing to avoid acquisition clashes? That's fair 
enough.

One complaint still hasn't been addresses. I still think prefixes should be 
defined in your server setup rather than in your templates. If Zope 2 hasn't 
got the machinery to do that then I think it would be better to give it the 
machinery rather than adding define="prefix ..." to TAL. Otherwise you still 
have the problem of having to put lots of defines into your templates or 
having templates which exist purely as include files containing definitions, 
neither of which is very nice,

F




More information about the ZPT mailing list