[ZPT] Making ZPT usuable outside Zope

Richard Jones richardjones at optushome.com.au
Sun Aug 22 03:45:41 EDT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[Note: not cc'ing roundup-users]

On Sun, 22 Aug 2004 08:28 am, Dieter Maurer wrote:
> Chris Withers wrote at 2004-8-21 08:54 +0200:
> > ...
> >
> >> TALES.py
> >>   1. changed imports to import from roundup.cgi
>
> Obviously not adaequate outside "roundup".

Absolutely. The only reason for the changed imports is to force importing of 
the PageTemplates I know work with Roundup.


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

See DocumentTemplate/ustr.py

"ustr = str" works for my purposes.


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

Yep. I probably could've just moved the import, but it was easier to just 
remove it altogether.


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

As I mentioned in my message to Chris, which he quoted, I'm not sure what the 
repurcussions might be of:

1. removing the Base base class from PageTemplate, and
2. changing the macros attribute implementation from a ComputedAttribute to
   a __getattr__ one.


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

Again, it was easier to just remove the code that move around all the imports. 
It should be possible to just move around the imports.


> >>   2. removed all Acquisition
>
> If they work without -- maybe...

Pretty sure this could be addressed (is just an issue of moving import 
statements)


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

Yep. Not sure how this would be handled...

In Roundup, I have no reason to restrict users from using leading underscores.


    Richard
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBKE8orGisBEHG6TARAqv+AJ98QNP9LXJkM4qqDQWdWnSj8jvzrACcDl7a
SvXaG5RsumohPvnnjKTyv18=
=aN11
-----END PGP SIGNATURE-----


More information about the ZPT mailing list