• 2110 views
  • 0 comments
  • loading...

BEAUTIFY is used to build HTML representations of compound objects, including lists, tuples and dictionaries (example 1).

BEAUTIFY returns an XML-like object serializable to XML, with a nice looking representation of its constructor argument.













# Example 1

{{=BEAUTIFY({"a": ["hello", XML("world")], "b": (1, 2)})}}

{"a": ["hello", XML("world")], "b": (1, 2)}

# the XML representation of

<table>
<tr><td>a</td><td>:</td><td>hello<br />world</td></tr>
<tr><td>b</td><td>:</td><td>1<br />2</td></tr>
</table>

loading...

Sources / Reference

" Web2py Book - Chapter 5" is licensed under Creative Common License BY-NC-ND 3.0


Comments

loading...

Powered by
Web2py

Hosted on
www.pythonanywhere.com
(affiliated link)