simplified beautify example

This commit is contained in:
mdipierro
2016-03-14 15:08:18 -05:00
parent 9533978b37
commit d94ea6b295
2 changed files with 2 additions and 2 deletions
@@ -27,4 +27,4 @@ def xml():
def beautify():
return dict(message=BEAUTIFY(request))
return dict(message=BEAUTIFY(dict(a=1,b=[2,3,dict(hello='world')])))
@@ -278,7 +278,7 @@ def xml():
<h3>Example {{=c}}{{c+=1}}</h3><b>In controller: template_examples.py </b>
{{=CODE("""
def beautify():
return dict(message=BEAUTIFY(request))
dict(message=BEAUTIFY(dict(a=1,b=[2,3,dict(hello='world')])))
""".strip(),language='web2py',link=URL('global','vars'),_class='boxCode')}}<b>and view: template_examples/beautify.html</b>
{{=CODE(open(os.path.join(request.folder,'views/template_examples/beautify.html'),'r').read(),language='html',link=URL('global','vars'),_class='boxCode')}}
<p>You can use BEAUTIFY to turn lists and dictionaries into organized HTML.