sql_select.html 831 B

12345678910111213141516171819202122232425262728293031323334353637
  1. {% load i18n %}
  2. <div class="djDebugPanelTitle">
  3. <a class="djDebugClose djDebugBack" href="">{% trans "Back" %}</a>
  4. <h3>{% trans "SQL Selected" %}</h3>
  5. </div>
  6. <div class="djDebugPanelContent">
  7. <div class="scroll">
  8. <dl>
  9. <dt>{% trans "Executed SQL" %}</dt>
  10. <dd>{{ sql|safe }}</dd>
  11. <dt>{% trans "Time" %}</dt>
  12. <dd>{{ duration }} ms</dd>
  13. </dl>
  14. {% if result %}
  15. <table class="djSqlSelect">
  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. <p>{% trans "Empty set" %}</p>
  35. {% endif %}
  36. </div>
  37. </div>