I would like to output {#
in html, but this is the beginning of a Jinja2 comment. This is not coming from a template variable. Just plain html in my template.
Any help ?
You can use {{ "{" }} outside of a raw block to insert a literal curly brace followed by % endraw %} . If you are generating HTML, you could use HTML entities, like { , % and } instead of { , % and } , respectively.
An escape sequence contains a backslash (\) symbol followed by one of the escape sequence characters or an octal or hexadecimal number.
The default Jinja delimiters are configured as follows: {% ... %} for Statements. {{ ... }} for Expressions to print to the template output.
Try this...
{{ '{#' }}
http://jinja.pocoo.org/docs/templates/#escaping
Hope this helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With