Denis V. Gudtsov wrote:

DLK> use an intermediary Script (Python), ie:

Thank you. But, can i do this without using python? From zpt -> to


well, yes in a way.

ZSQL methods have to be called like other metods, but AFAIK, they cannot be traversed like, for instance, scripts. As I understand it, this is for security reasons (I myself would never allow a zsql to be exposed without some scripts in between, but that's just me...)

Anyway, one way to do what you want is to do more in the zpt than may be advisable: exactly how to do it, I leave up to you, becasue there are several different ways of achieving this, but I give general directions. Also, there are probably other ways than what I describe below.

You can make the form post to iself, and use calls inside the form to prepare the input to the zsql.

lets say your zpt is called "entry_form" and looks something like this (pseudo zpt):

<span tal:define="name request/form/name;
                 account request/form/account;
unused python: clients_add_sql(name=name, account=account);" tal:omit-tag="" />

<form action="entry_form">
<input type="text" name="name">
<input type="text" name="account">
<input type="submit">

Not sure if this works, but that is the general idea. This was inspired from

section: "Form Processing"

Good luck!


-- -------------------------------------------------------------------
Dario Lopez-Kästen, IT Systems & Services Chalmers University of Tech.
Lyrics applied to programming & application design:
"emancipate yourself from mental slavery" - redemption song, b. marley

Zope maillist  -
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to