I have the following template (part):
$code:
def status(c):
st = {}
st[0] = 'Not Started Yet'
st[1] = 'In Progress'
st[2] = 'Finished'
return st[c]
$for t in todos:
<tr class="$loop.parity"><td><input
type="checkbox"></td><td>$t.summary</td><td>$status(t.status)</td><td>
$t.name
</td><td>$t.timestamp</td></tr>
The question is, in the function call $status(), if I call
$status(t.status), as above, it works, but if I do:
$status($t.status), it does NOT! My original understanding is $ is
used to "dereference" the template variable, i.e. use its value?
Could anyone please explain the problem presented here?
Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" 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/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---