[Zope] Using a ZSQL method from a Python script

Marc de Kamps kamps@in.tum.de
Tue, 25 Mar 2003 14:19:14 +0100


Hi,

I have made a ZSQL method, which
adds a line to a table, much like
the hire_employee method in 'the Zope book'.
When I test it, an html form appears, I can
enter all data, submit.

I have also implemented the list_all_employees
ZSQL method, and when I test it, I can see that
in fact the data have landed in the table correctly.
So far, so good.

>From what I understand in the Zope book,
I can then add new employees from a Python
script like this:

------------------
context.hire_employee(42,'bob','uncle',50000.00)
return "Done"
------------------

I get an internal server error 500, however,
when I hit the test button.

The hire_employee method and the Python
script are in the same folder.

What am I overlooking ?

Thanks, 
	Marc