Output sql_queries in Firebug console when in debug mode

1
2
3
4
5
6
7
{% if debug %}
<script type="text/javascript">
  {% for q in sql_queries %}
    console.debug("({{ q.time }}s)", "{{ q.sql|escapejs }}");
  {% endfor %}
</script> 
{% endif %}

More like this

  1. SQL Log To Console Middleware by davepeck 4 years, 8 months ago
  2. Middleware for printing of exception to console by dballanc 6 years, 7 months ago
  3. Debug SQL Query in Template by dario.agliottone 1 year, 11 months ago
  4. SQL Printing Middleware by ericflo 6 years, 10 months ago
  5. Quiet runserver by danielroseman 3 years, 10 months ago

Comments

(Forgotten your password?)