[Zope] Calling a DTML Method with arguments
Howard Hansen
zope@halfmagic.com
Mon, 24 Jun 2002 22:53:35 -0700
I needed to send a bunch of emails via Zope today. I figured I would just
use the python script I found on ZopeLabs...
http://www.zopelabs.com/cookbook/991178206
...but that appears to have a problem with email addresses containing
hyphens. No good.
So I pulled out one of my old dtml methods for sending mail and tried to
stick a call to it inside a dtml-in loop. And I got stuck. How do I call
the DTML Method? I tried calling it as: <dtml-call "method(arg1='test')">.
Didn't like that. I'm calling from a DTML Document, which has its own
namespace, so I figured the method would use that, so I tried <dtml-call
"method">. This at least began executing the method, though it did give a
KeyError on the data from the sequence.
I gave up and stuffed the sendmail code inside the loop and called it good.
But I'm still wondering how to make this work. Any clues? What have I
missed?
TIA,
Howard Hansen
http://howardsmusings.com/categories/zope