Hi,
I would like to do some dynamic formating in my table according to the
header datatypes (which are imported from SQL table with the data together).
In other words I would like to change the value of the <td align =
"right/left"> tag according to the datatype of data inserted to the table
cell.
Till now I hawe following which does not work. I mean the python "if"
statement works, but the rest (changing of the align value) does not.
Any ideas?

<tr py:for="myRow in myTable[1]">
<td align="right" py:for="i, myCell in enumerate(myRow)">
<?python
if myTable[0][i][1] == float:
    cellContent = locale.format('%d', myCell, True)
    cellAlign = "align = 'right'"
else:
    cellContent = myCell
    cellAlign = "align = 'left'"
?>
${XML(cellAlign)} ${obsah} </td>
</tr>


Best regards

Petr Jakes
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
kid-template-discuss mailing list
kid-template-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kid-template-discuss

Reply via email to