Need to pass dtml-in parameter

Lee Harr missive at frontiernet.net
Thu Nov 6 23:35:59 CET 2003


On 2003-11-06, Andre Dourado <adourado at eln.gov.br> wrote:
> I´m a newbie in Zope and I have a little problem.
>
> I'm trying to use a dtml-in tag to call a ZSQL, but the name of my
> ZSQL is stored in a sql table.
>
> I've tried things like:
>
><dtml-in expr=<dtml-var my_query>> where my_query is the column name
> of my sql table where the ZSQL name is stored.

You might try something along the lines of: (completely untested)

<dtml-let zsql_name="my_query()[0]">
<dtml-in "_[zsql_name]()">

</dtml-in>
</dtml-let>


but I think you will be better off getting your result from a python
script that can find the correct query and return it. You should
also think about using ZPT instead of dtml.

And you should definitely be asking this question on the zope
mailing list:  zope at zope.org






More information about the Python-list mailing list