To render a template variable as HTML with Python Django, we can use autoescape off
or safe
.
For instance, we write
{{ myhtml |safe }}
to use the safe
filter to render myhtml
as HTML.
Or we use
{% autoescape off %}
{{ myhtml }}
{% endautoescape %}
to use the autoescape off
to render myhtml
as HTML.