Browse Source

Use json.dumps for the string handling instead.

pull/24/head
Ben Kurtovic 9 years ago
parent
commit
b2db78f021
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      templates/api.mako

+ 4
- 3
templates/api.mako View File

@@ -1,3 +1,6 @@
<%!
from json import dumps
%>\
<%def name="do_indent(size)">
<br />
% for i in xrange(size):
@@ -21,10 +24,8 @@
% endfor
${do_indent(indent)}
]
% elif isinstance(obj, type("").__bases__[0]):
"${obj | h}"
% else:
${obj | h}
${dumps(obj) | h}
% endif
</%def>\
<!DOCTYPE html>


Loading…
Cancel
Save