I missed the original message, but I'm trying to do something similar
-- use Python Methods rather than DTML -- and I found one critical
difference just today.  Here's an example:

I've got an SQL Method called 'select_item' that takes 'item_id' as
its only input parameter.

I've got a DTML Method 'form_action' that has 'item_id' in its
namespace by virtue of being posted from an HTTP form.

When I would invoke the SQL method from DTML I could do just
<dtml-call select_item>
and the SQL method would get the item_id from the DTML method.

But when using a new 'action_script' Python Method (PythonMethod
0.1.7) I have to pass that item_id explicitly from the DTML
   <dtml-call "action_script(item_id)">
and action_script itself has to call the SQL method like so

I don't know why the explicit parameter passing is needed in the
latter case (DTML to Python Method to SQL Method) but not in the
former (DTML to SQL Method).  I'm sure I'm missing some trick.

In fact, this aspect of Zope -- when values are passed explicitly and
when not -- is a major confusion for me.  (And anyone who responds
about "Zen" deserves to have the size 12 boot applied.)

On Mon, Jan 29, 2001 at 09:28:17AM +1100, Curtis Maloney wrote:
> The SQL Method works fine.  I can easily test that with the 'Test' tab.  
> Really, the only difference now to how I would have previously done this is 
> that I have the python method slicing the result for me.
> That being said, I have tried removing that, and going to the Z SQL method 
> directly, and it STILL doesn't work.

Fred Yankowski           [EMAIL PROTECTED]      tel: +1.630.879.1312
Principal Consultant     www.OntoSys.com       fax: +1.630.879.1370
OntoSys, Inc             38W242 Deerpath Rd, Batavia, IL 60510, USA

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to