[ZPT] Two column ZPT output from SQL

Duane Raymond duane.raymond at gmail.com
Tue Oct 5 06:52:27 EDT 2004


On Tue, 05 Oct 2004 11:53:59 +0200, Tino Wildenhain <tino at wildenhain.de> wrote:
> Dont try to do this all in ZPT. It leads to very ugly code (as
> shown above)
> 
> Use a pyton script to prepare the values:
<snip>

Thanks Tino - worked like a charm.

I am now trying to generalise it so I can use the same python script
for any SQLQuery-ZPT multi-column.  I've made columnwidth and
queryname into parameters, but I can't seem to find a way to have the
'queryname' value (i.e. sql_getMyList() ) substituted in the line like
:
qresults=context.queryname.dictionaries() 
    instead of:
qresults=context.sql_getMyList().dictionaries()

Any further hints (I'm still scowering my 'learning python' book as well)

Duane


More information about the ZPT mailing list