Hello, I need to generate inside a div tag the style attribute dinamically, something like:
<div class="container" style="background-color:#ded;">2</div> for some situations the following code works well: [...] elif day == current_day: stilo = 'style=\"font-weight:bold;\"' pass [...] <div class="column"> <div class="container" {{=XML(stilo)}}>{{=XML(day)}}</div> </div> The problem comes when I try to do the following [...] elif day == current_day: stilo1 = 'style=\"background-image:url("/init/static/li_dash.gif"); \"' pass [...] <div class="column"> <div class="container" {{=XML(stilo)}}>{{=XML(day)}}</div> </div> I have try to put "\" before each "/" too and does not work. Is not rendered well. Anyone knows the right way to insert this kind of code in python?? I come from the PHP world :( Thanks!