[ZPT] probleme with condition

gustav gustav at ifrance.com
Wed Aug 25 04:56:52 EDT 2004


Hello,

I have a table with different columns (= numbers) coming from a mysql
db.
When the content of this columns meet a condition, I want to change the
color.

<td align="center" 
  tal:content="python:container.s_division(var_period, info_count)"
  tal:condition="python:not container.s_compare(var_ouvre,
container.s_division(var_period, info_count))"
  style="color=red"> </td>
<td align="center" 
  tal:content="python:container.s_division(var_period, info_count)"
  tal:condition="python:container.s_compare(var_ouvre,
container.s_division(var_period, info_count))"
  style="color:green"> </td>

the script s_compare :
import string
print int(round(10*(int(numint) - float(str)))) == 0
return printed

The problem : the test is not working, its allways green.

But if I add a cell with the comparing thing as content 
<td tal:content="python:container.s_compare(var_ouvre,
container.s_division(var_period, info_count))"> </td>

I can see that the comparaison is ok - i get true or false

What's wrong ?
_______________________________________________________________
my music http://hurpasard.free.fr
my paintings http://peinturesurlenet.free.fr 
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.744 / Virus Database: 496 - Release Date: 24/08/2004


_____________________________________________________________________
Envie de discuter en "live" avec vos amis ? Télécharger MSN Messenger
http://www.ifrance.com/_reloc/m la 1ère messagerie instantanée de France



More information about the ZPT mailing list