[ZPT] Using variables in path expressions

Evan Simpson evan@digicool.com
Fri, 8 Jun 2001 09:54:43 -0400


From: "Brent Hendricks" <brentmh@ece.rice.edu>
> I will make one final impassioned plea, and then remain forever silent
> on this issue :) While the above methods will work, why not allow ${}
> expansion in paths by default (ie. without needing to use python:)?

No good reason I can think of. I have this vague memory of discussing it
with Jim and Todd, but I don't know why we thought it was a big deal.  We
may have been worried that "a/${request/form/b}" could be hijacked by
providing a 'b' with slashes in it, but that's equally possible with the
current implementation: http://...?b=one&b=two.

> I'm willing to bet that I'm not the only one who thought that if it
> worked in strings, it ought to work in paths too (what is a path, but
> just string that gets traversed?).  To me, it seems like the principle
> of least surprise.

Makes sense to me :-)

> If I write up a proposal for the DiscussTALES page, would you be
> willing to do another survey?

Please do! That's what DiscussTALES is there for.  I wonder if a survey
should become a standard precursor to a new release.

> PS.  I guess I'm arguing somewhat vehemently because I want ZPT to be
> the best that it can be.  I really do love Page Templates :) and I
> think you guys have been doing an excellent job.  Here at Rice
> University we're using them in a production site for coordinating
> course materials between professors here and at several other schools.
> ZPT was definitely the selling point that convinced us to go with
> Zope.

Glad to hear it!

Thanks,

Evan @ digicool