Opened 14 years ago
Closed 14 years ago
#17237 closed Cleanup/optimization (wontfix)
Format {% debug %} tag output as JSON
| Reported by: | Owned by: | nobody | |
|---|---|---|---|
| Component: | Template system | Version: | 1.3 |
| Severity: | Normal | Keywords: | debug template tag |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Output for the {% debug %} template tag is very close to JSON format. If this output was formatted in JSON it could be visualized in a better way with JSON presentation tools.
Note:
See TracTickets
for help on using tickets.
The
{% debug %}tag outputs Python code, whose dictionary syntax is close to JSON. Changing this tag to output JSON would be backwards-incompatible.However, it's implemented in less than 10 lines; you can easily copy it in your app and change it to output JSON.
Or just use the Django debug toolbar :)