...">

Returning html tags in Django

I have a view function that returns an HTML page:

render_to_response("test.html", {test: value, somehtml: '<h1>t<h1>'})

      

The value somehtml

is now rendered as a string rather than as HTML with tags. How can I get HTML tags back in my template?

0


a source to share


1 answer


Ok, got the answer: using a filter safe

.



{{ somehtml|safe }}

      

+2


a source







All Articles