python - How to format with a UNICODE string to JINJA's variable in a template? -


How to set the string with the Unicode value in the Jinja 2 template?

  {% set Left = '& lt; Span class = "link" onclick = "togglelogin registry (this)" & gt; {0}  gt; Formats (registerhint)%}   

UnicodeEncodeError raises if registerHint does not otherwise have a Unicode string.

Instead use Ginja and your string Unicode for you:

  {% set left = '& lt; Span class = "link" onclick = "togglelogin registry (this)" & gt;% s & lt; / Span & gt; ' | Format (register hunt)%}    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -