{% with "vis-data-"|add:result.index as script_name %} {{ result.rows|json_script:script_name }} {% endwith %}
SQL query {% if saved_dashboard %}
{{ result.sql }}
{% else %} {% endif %} {% if not saved_dashboard %}

{% endif %}