As I know if I put
{{ var_name }}
in django template, it will be parsed as an variable. What should I write if I want the string “{{ var_name }}” displayed in HTML file (not {{ var_name }})?
I’m not quite sure how to describe this question, so I have no idea what key word to search in Google. Thank you.
What you want to do is called escaping.
You can substitute the brackets like this:
{instead of{}instead of}So, in your HTML code,
{{ var_name }}will output
{{ var_name }}.And there’s also the boring way: templatetag tag.