sql_profile.html 904 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. {% load i18n %}
  2. <div class="djDebugPanelTitle">
  3. <a class="djDebugClose djDebugBack" href="">{% trans "Back" %}</a>
  4. <h3>{% trans "SQL Profiled" %}</h3>
  5. </div>
  6. <div class="djDebugPanelContent">
  7. <div class="scroll">
  8. {% if result %}
  9. <dl>
  10. <dt>{% trans "Executed SQL" %}</dt>
  11. <dd>{{ sql|safe }}</dd>
  12. <dt>{% trans "Time" %}</dt>
  13. <dd>{{ duration }} ms</dd>
  14. </dl>
  15. <table class="djSqlProfile">
  16. <thead>
  17. <tr>
  18. {% for h in headers %}
  19. <th>{{ h|upper }}</th>
  20. {% endfor %}
  21. </tr>
  22. </thead>
  23. <tbody>
  24. {% for row in result %}
  25. <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
  26. {% for column in row %}
  27. <td>{{ column|escape }}</td>
  28. {% endfor %}
  29. </tr>
  30. {% endfor %}
  31. </tbody>
  32. </table>
  33. {% else %}
  34. <dl>
  35. <dt>{% trans 'Error' %}</dt>
  36. <dd>{{ result_error }}</dd>
  37. </dl>
  38. {% endif %}
  39. </div>
  40. </div>