[Zope] DTML Example In Zope Book
Dave
morgue@planetdave.dynip.com
Wed, 28 Feb 2001 23:00:43 -0500
As a Zope newbie, I attempted to run the little DTML Method example in the
Zope book (Chap 3 - Basic Objects). This involves creating 2 DTML Methods
and a Python script to input some numbers and return compounding interest data.
I basically copy-pasted the code from the book into the needed methods and
script, but when I run it, I continually get a NameError (Zope cannot find
a var with this name) on the first variable that the script comes to when
running.
For example, if I access the page as in the example, I get a NameError on
"interest_rate". If I remove this from the picture (remove the
"interest_rate" reference from the calculateCompoundingInterest script and
then access the form again, I will get a NameError on the next variable it
runs into - this time "periods."
I have some familiarity with Perl, but have not used Python scripting, so
I have no idea where to start on troubleshooting this. But it appears to
not be a script problem, but rather that the variable assignments made in
the form thru the first DTML Method are not being passed to the script.
Is there a syntax change that needs to be made for a newer Zope? As I
said, I basically copy and pasted the code from the example since I am just
beginning to learn the DTML calls. I have Zope 2.3.0 installed on a Win32
platform.
Thanks for any assistance!!
- Dave