Opened 11 years ago

Closed 10 years ago

#17237 closed Cleanup/optimization (wontfix)

Format {% debug %} tag output as JSON

Reported by: sdeleon28@… 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


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.

Change History (1)

comment:1 Changed 10 years ago by Aymeric Augustin

Resolution: wontfix
Status: newclosed

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 :)

Note: See TracTickets for help on using tickets.
Back to Top