Python ternary expressions are just expressions, so one element of a
ternary can itself be another ternary (i.e., you can nest them). So, you
can do:
1 if condition1 else 2 if condition2 else 3
which for clarity you could write as:
1 if condition1 else (2 if condition 2 else 3)
As an aside, l
sorry, I over simplified. I'd like to handle more than two conditionals.
For example, based on another field's value, I would like a different
message to appear.
So with two conditionals, syntax does work. Seel yellow
connection_canceling_links = [dict(header='Cancel connection',
body=lamb
pardon, i'm a little bit confuse with your code, i think you can create the
links in grid with the a href, and then put the represent for coloring it's
font via dal represent
e.g. not tested
table_status = {True, False}
db.table.is_active.represent = lambda is_active, field:
SPAN(table_status[i
3 matches
Mail list logo