[Zope-DB] Specifying query arguments in DTML

Charlie Clark charlie@begeistert.org
Tue, 25 Feb 2003 10:11:01 +0100


On 2003-02-25 at 09:49:17 [+0100], Alex Cowan wrote:
> You can do <dtml-in "sqlMethod(var1=var1, var2=var2)">
> 
> You need to make sure that var1 and var2 are defined somewhere though (I 
> used <dtml-call "REQUEST.set a lot hehe)
> 
> Its much easier than passing it in the url (and allows you to keep the 
> variables secret if you want). In general I only use variables in the url 
> if I want to give the user a way to get back to a specific page.

Oh I understand this now.

You can just pass a dictionary or a list of pairs to the method.

<span tal:replace="python: here.mySQLMethod(first="one", 
second="two")"></span> in a ZPT or just use a PythonScript

Charlie