# HG changeset patch # User Samuel Trégouët <samuel.tregouet@logilab.fr> # Date 1475067234 -7200 # Wed Sep 28 14:53:54 2016 +0200 # Node ID 1390aeef7481b687d5502f3f0c1e35259747b5d4 # Parent 9387dfaca9ccd77e18de7a56b88dd42605d6c855 [view] write debug info into a `pre` tag diff --git a/views.py b/views.py --- a/views.py +++ b/views.py @@ -114,7 +114,9 @@ children_for=children_for) if 'debug-es' in self._cw.form: import json - self.w(unicode(json.dumps(search._s.to_dict()))) + self.w(u'<pre>') + self.w(unicode(json.dumps(search._s.to_dict(), indent=2))) + self.w(u'</pre>') self.w(u'<br/>') try: return search.execute()