sql_select.html 890 B

123456789101112131415161718192021222324252627282930313233343536373839
  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. <dt>{% trans "Database" %}</dt>
  14. <dd>{{ alias }}</dd>
  15. </dl>
  16. {% if result %}
  17. <table class="djSqlSelect">
  18. <thead>
  19. <tr>
  20. {% for h in headers %}
  21. <th>{{ h|upper }}</th>
  22. {% endfor %}
  23. </tr>
  24. </thead>
  25. <tbody>
  26. {% for row in result %}
  27. <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
  28. {% for column in row %}
  29. <td>{{ column|escape }}</td>
  30. {% endfor %}
  31. </tr>
  32. {% endfor %}
  33. </tbody>
  34. </table>
  35. {% else %}
  36. <p>{% trans "Empty set" %}</p>
  37. {% endif %}
  38. </div>
  39. </div>