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

sql - Return Function using Cursor -

sql server - How to use pivot in this table -

javascript - Is there any way to add a new parameter to a function programmatically? -