I have a template to render but since it has some tags too it’s getting difficult to access particular strings.The code goes like this:
template="""
<select>
<option {% if record.views = '%s' %} selected {% endif %}>'%s'
</select>
"""%(pop, pop)
Here I want the value of pop but it gives an error that:
Caught TypeError while rendering: not enough arguments for format string
Any solution how can i access those string format.
Thanks
You need to double the % signs:
yields
for pop=’1′