[ZPT] Making ZPT usuable outside Zope

Chris Withers chris at simplistix.co.uk
Mon Aug 23 06:31:39 EDT 2004


Dieter Maurer wrote:
>>>TALES.py
>>>  1. changed imports to import from roundup.cgi
> 
> Obviously not adaequate outside "roundup".

Of course, but wouldn't it be better if ZPT didn't NEED Zope to be 
installed, purely because of some imports?

>>>  2. implemented ustr as str (removes import from DocumentTemplate)
> 
> Not sure, what "ustr" is -- but probably not "str"...

Hmmm, Richard, do you use unicode at all, or do you try and ignore it as 
  best you can?

>>>  3. removed import and use of Unauthorized from zExceptions
> 
> It should use "zExceptions.Unauthorized" at least in the Zope
> context.

I'd like to see a diff of the change needed. Yes, Unauthorized in needed 
for Zope, but it shouldn't be that tightly woven in that Richard needs 
to support its import in high use of ZPT...

>>>  2. removed use of ExtensionClass
>>>  3. removed use of ComputedAttribute
> 
> not sure whether these are essential...

Indeed, I think this was Richard's question, are these really necessary, 
or were they just used for convenience which then created an unneccesary 
dependence on other parts of Zope...

>>>Expressions.py
>>>  1. removed all Zope-specific code (doesn't even try to import that
>>>     stuff now)
> 
> If they work without -- maybe...

Why not just a "yes" for this and Acquisition?

>>>  3. removed blocking of leading-underscore URL components
> 
> Surely, this should stay inside Zope...

Shouldn't this be done in the traversal machinery for Zope?

Richard, how hard would it be to provide a diff for your changes, since 
it looks like that might really aid the discussion?

cheers,

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk



More information about the ZPT mailing list