[Zope] ZPT: examples in The Zope Book don't work

Chris McDonough chrism@zope.com
Tue, 27 Aug 2002 15:04:56 -0400


I believe this is fixed in the 2.6 edition of the Zope Book
available at
http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/

Thanks for the report...

----- Original Message -----
From: "Joseph A. Knapka" <jknapka@earthlink.net>
To: <zope@zope.org>
Sent: Tuesday, August 27, 2002 1:14 PM
Subject: [Zope] ZPT: examples in The Zope Book don't work


> Hi folks,
>
> I was trying page templates out for the first time the
> other day, and ran into this minor problem:
>
> After cut&pasting the code from the "compoundInterest"
> example in chapter 5 of TZB into my ZMI, they didn't
> work. The interestDisplay template, confronted with
> <span tal:replace="years">, threw an exception claiming
> that "years" was undefined. Changing it to
> <span tal:replace="request/years"> worked fine.
> Similarly, all references to request variables
> in the invocation of the Python script had to be
> changed from "variable" to "request.variable".
>
> Am I missing something here, or is this the way
> templates are supposed to work?
>
> (Incidentally, this was Zope 2.5.1 on a Linux box.)
>
> Thanks,
>
> -- Joe
>   "I'd rather chew my leg off than maintain Java code, which
>    sucks, 'cause I have a lot of Java code to maintain and
>    the leg surgery is starting to get expensive." - Me
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>