From a7f3d39da2a9d60e60694f83551064f0834e9a99 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Thu, 21 May 2015 11:12:43 +0100 Subject: [PATCH] Use the entire event in the example JSON. Sort keys on JSON. --- templating/build.py | 2 +- templating/templates/events.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templating/build.py b/templating/build.py index cf4a7e2e..da680881 100755 --- a/templating/build.py +++ b/templating/build.py @@ -73,7 +73,7 @@ def main(file_stream=None, out_dir=None): # add a template filter to produce pretty pretty JSON def jsonify(input, indent=None, pre_whitespace=0): - code = json.dumps(input, indent=indent) + code = json.dumps(input, indent=indent, sort_keys=True) if pre_whitespace: code = code.replace("\n", ("\n" +" "*pre_whitespace)) diff --git a/templating/templates/events.tmpl b/templating/templates/events.tmpl index 72501fac..24af5052 100644 --- a/templating/templates/events.tmpl +++ b/templating/templates/events.tmpl @@ -20,4 +20,4 @@ {% endfor %} Example:: - {{example.content | jsonify(4, 4)}} + {{example | jsonify(4, 4)}}