[Zope-CMF] Problem with Example in The Zope Book
Dieter Maurer
dieter@handshake.de
Tue, 2 Jul 2002 21:16:51 +0200
mcolli@SyscomCipher.com.ar writes:
> I am following the Zope Book and I am trying to reproduce an example using
> two Page Templates and a Python Script and I get the following error:
>
> ====================================
> Zope Error
> Zope has encountered an error while publishing this resource.
>
> Error Type: Undefined
> Error Value: years not found in 'years', at line 4, column 1
> ...
>
> interestRateForm:
>
> <html>
> <body>
> <form action="interestRateDisplay" method="POST">
> <p> Please enter the following information:</p>
> Your current balance (or debt): <input name="principal:float"><br>
> Your annual interest rate: <input name="interest_rate:float"><br>
> Number of periods in a year: <input name="periods:int"><br>
> Number of years: <input name="years:int"><br>
> <input type="submit" value=" Calculate " ><br>
> </form>
> </body>
> </html>
> ...
> and interestRateDisplay:
> ===========================
>
> <html>
> <body>
> <p>Your total balance (or debt) including compounded interest over
> <span tal:content="years">2</span> years is:</p>
> <p><b>$<span tal:content="python: here.calculateCompoundingInterest
> (principal, interest_rate, periods, years)" >1.00</span></b></p>
> </body>
> </html>
I do not understand it either...
Use "<div tal:content="structure request"/> in "interestRateDisplay"
to analyse what the request really contains. Maybe a typo...
Dieter