Hello hello,
    I think kid was chosen because it was the best at the time but now
I think there was talk about moving to Genshi.  I agree with you, kid
takes pretty much 70% of my time.  Debugging it is nearly impossible
so it comes down to needing to memorize the error codes once you
figure out what went wrong after a few hours of moving things around.

Now to address your problem I would try something like this
<td py:for="data in d">
    <span py:if="data=='0'" py:strip=''><br/></span>
    <span py:if="data!='0'" py:strip=''>${data}</span>
</td>

And the py:strip should get rid of the span tags in the final output
so they aren't taking up preciuos page size.
-Ian

On 10/27/06, Michael Steinfeld <[EMAIL PROTECTED]> wrote:
> I don't know .. is it just me to spend more time trying to get thing done
> with kid templates then working with turbogears?
> I have a project that has been a lot of fun to working except for kid, it
> occupies the majority of my team and delays my project completion.
>
> If I was a bully, I would beat that kid up!
>
> Anyhow, I am simply trying to do a simple if/else statement and it is
> driving me mad. I need your guys help. What would be the best way to do it?
>
> Python Code I am converting:
>
> if data = "0":
>    print "<td class='lightsout'></td>"
> else:
>    print  "<td class='lightson'> data </td>"
>
>
> kid template code
>
>
>  <tr py:for="d in results">
>       <td py:for="data in d">
>          ${data}
>
> actually, easier said.. I am trying to replace all occurrences of string "0"
> with an empty string ""
>
> I have read the kid docs but they seem to be pretty brief and missing a lot
> of helpful information.
>
> thanks in advance.
>
>
>
> --
> -mike
>
>
>  >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to