[Zope] Zope Book -> Chap 3 -> Interest Rate Example

Simon Forster simon-lists@ldml.com
Thu, 5 Jun 2003 13:37:33 +0100


Yesterday I managed to instal Python and Zope. Today I'm learning how 
to use Zope. I'm not 100% sure I understand the Zope model - but then 
I'm only on chapter 3 and I'm sure many of my questions will be 
answered later in the book. However, the interest rate example given in 
the book returns an error to me:

"Zope Error

Zope has encountered an error while publishing this resource.

Error Type: KeyError
Error Value: years"

This appears to be quite a simple error where the form value "years" is 
not being seen by Zope. This error is thrown the first time "years" is 
referenced. That is:

<span tal:content="years">2</span>

This code appears in a Page Template.

If I cut this code out, the page errors at the next form value 
(principal).

Obviously I'm not "capturing" the form values submitted by the html 
form. However, The "Page Template" object doesn't give you a method to 
explicitly capture these form elements so I assume that this happens 
automagically. An incorrect assumption?

Can anyone point me to where I'm going wrong?

TIA

Simon Forster
___________________________________________________
   LDML Ltd, Office One, 16 Canham Road, London, W3 7SR, UK
         Tel: +44 (0)20 8749 7766     Fax: +44 (0)70 9230 5247
___________________________________________________