request_vars.html 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. {% load i18n %}
  2. <h4>{% trans 'View information' %}</h4>
  3. <table>
  4. <thead>
  5. <tr>
  6. <th>{% trans 'View Function' %}</th>
  7. <th>{% trans 'args' %}</th>
  8. <th>{% trans 'kwargs' %}</th>
  9. </tr>
  10. </thead>
  11. <tbody>
  12. <tr>
  13. <td>{{ view_func }}</td>
  14. <td>{{ view_args|default:"None" }}</td>
  15. <td>
  16. {% if view_kwargs.items %}
  17. {% for k, v in view_kwargs.items %}
  18. {{ k }}={{ v }}{% if not forloop.last %}, {% endif %}
  19. {% endfor %}
  20. {% else %}
  21. None
  22. {% endif %}
  23. </td>
  24. </tr>
  25. </tbody>
  26. </table>
  27. <h4>{% trans 'COOKIES Variables' %}</h4>
  28. {% if cookies %}
  29. <table>
  30. <colgroup>
  31. <col style="width:20%"/>
  32. <col/>
  33. </colgroup>
  34. <thead>
  35. <tr>
  36. <th>{% trans "Variable" %}</th>
  37. <th>{% trans "Value" %}</th>
  38. </tr>
  39. </thead>
  40. <tbody>
  41. {% for key, value in cookies %}
  42. <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
  43. <td>{{ key|escape }}</td>
  44. <td>{{ value|escape }}</td>
  45. </tr>
  46. {% endfor %}
  47. </tbody>
  48. </table>
  49. {% else %}
  50. <p>{% trans "No COOKIE data" %}</p>
  51. {% endif %}
  52. <h4>{% trans 'SESSION Variables' %}</h4>
  53. {% if session %}
  54. <table>
  55. <colgroup>
  56. <col style="width:20%"/>
  57. <col/>
  58. </colgroup>
  59. <thead>
  60. <tr>
  61. <th>{% trans "Variable" %}</th>
  62. <th>{% trans "Value" %}</th>
  63. </tr>
  64. </thead>
  65. <tbody>
  66. {% for key, value in session %}
  67. <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
  68. <td>{{ key|escape }}</td>
  69. <td>{{ value|escape }}</td>
  70. </tr>
  71. {% endfor %}
  72. </tbody>
  73. </table>
  74. {% else %}
  75. <p>{% trans "No SESSION data" %}</p>
  76. {% endif %}
  77. <h4>{% trans 'GET Variables' %}</h4>
  78. {% if get %}
  79. <table>
  80. <thead>
  81. <tr>
  82. <th>{% trans "Variable" %}</th>
  83. <th>{% trans "Value" %}</th>
  84. </tr>
  85. </thead>
  86. <tbody>
  87. {% for key, value in get %}
  88. <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
  89. <td>{{ key|escape }}</td>
  90. <td>{{ value|join:", "|escape }}</td>
  91. </tr>
  92. {% endfor %}
  93. </tbody>
  94. </table>
  95. {% else %}
  96. <p>{% trans "No GET data" %}</p>
  97. {% endif %}
  98. <h4>{% trans 'POST Variables' %}</h4>
  99. {% if post %}
  100. <table>
  101. <thead>
  102. <tr>
  103. <th>{% trans "Variable" %}</th>
  104. <th>{% trans "Value" %}</th>
  105. </tr>
  106. </thead>
  107. <tbody>
  108. {% for key, value in post %}
  109. <tr class="{% cycle 'row1' 'row2' %}">
  110. <td>{{ key|escape }}</td>
  111. <td>{{ value|join:", "|escape }}</td>
  112. </tr>
  113. {% endfor %}
  114. </tbody>
  115. </table>
  116. {% else %}
  117. <p>{% trans "No POST data" %}</p>
  118. {% endif %}