Hi,
I would like to ask a question.
Now I am using pyramid + jinja2.
And I have patched the format filter to use the new format supported
in Python 2.7 according to the following:
https://github.com/mitsuhiko/jinja2/pull/289/files
I wanted to use the format filter as shown below to print the number as
percentage.
But I failed, because Jinja2 recognised "%}" as a closing tag not as a
format string.
<td class='number'>{{ "{:.0%}"|format(row['usage']) }}</td>
I managed to solve it by modifying it.
<td class='number'>{{ "{:.0f}%"|format(row['usage']*100) }}</td>
I just want to know it is possible to escape "%}" not to recognise as a tag.
Thanks in advance!
Sungsoo Kim
--
You received this message because you are subscribed to the Google Groups
"pocoo-libs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pocoo-libs.
For more options, visit https://groups.google.com/d/optout.