replace only one variable in web.py templates

Posted by Asterisk on Stack Overflow See other posts from Stack Overflow or by Asterisk
Published on 2010-03-08T04:30:25Z Indexed on 2010/03/08 4:36 UTC
Read the original article Hit count: 357

Filed under:

I am passing variable to template in web.py and have the same condition in some places. Like this:

$if myvar=="string1":

$passed argument1

............

$if myvar =="striung2":

$passed argument2

If say myvar is "string1" and I pass passed = "AAA" then I have AAA argument1 on my page, but the other if statements get replaced by empty string?

How to avoid that? I.e. how to leave other statements intact?

© Stack Overflow or respective owner

Related posts about web.py