Displaying an HTML table from a Django view in another template Displaying an HTML table from a Django view in another template pandas pandas

Displaying an HTML table from a Django view in another template


To work over it you can do one of the following listed below:

  1. Use <pre> tag this way all the escaped characters like < > etc will be rendered as it is can be done as:

<pre> {{ html_table }}</pre>

  1. Use the autoescape filter available in django builtins can be done as:

{% autoescape off %} {{ html_table }}{% endautoescape %}

The second option is better as it is given by django and only the developer has the authority over it.