simplified beautify example
This commit is contained in:
@@ -27,4 +27,4 @@ def xml():
|
|||||||
|
|
||||||
|
|
||||||
def beautify():
|
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>
|
<h3>Example {{=c}}{{c+=1}}</h3><b>In controller: template_examples.py </b>
|
||||||
{{=CODE("""
|
{{=CODE("""
|
||||||
def beautify():
|
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>
|
""".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')}}
|
{{=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.
|
<p>You can use BEAUTIFY to turn lists and dictionaries into organized HTML.
|
||||||
|
|||||||
Reference in New Issue
Block a user