[Zope] Return success or fail from ZSQL method
Thomas B. Passin
tpassin@mitretek.org
Fri, 8 Jun 2001 09:33:11 -0400
[Sion Morris]
>
> I have a form which when submitted calls a python scripts. The python
> scripts in turn calls a ZSQLMethod which enters data into a MySQL
> data. When the python script has done the data entry, either
> succesfully or not I would like it to point to a DTML method which
> will report on the action to the user.
>
I suggest you don't do it like that, because this design introduces extra
coupling between the components. It's better to avoid that if possible.
Instead, have the python script return to its caller, then have the caller
call the DTML method or just render the response on the page. The script
just needs to return a zero or non-zero, which is easy to check.
Cheers,
Tom P