Package web2py :: Package gluon :: Module html :: Class BEAUTIFY
[hide private]
[frames] | no frames]

Class BEAUTIFY

source code

  object --+        
           |        
XmlComponent --+    
               |    
             DIV --+
                   |
                  BEAUTIFY

example:

   >>> BEAUTIFY(['a', 'b', {'hello': 'world'}]).xml()
   '<div><table><tr><td><div>a</div></td></tr><tr><td><div>b</div></td></tr><tr><td><div><table><tr><td style="font-weight:bold;"><div>hello</div></td><td valign="top">:</td><td><div>world</div></td></tr></table></div></td></tr></table></div>'

turns any list, dictionary, etc into decent looking html.

Instance Methods [hide private]
 
__init__(self, component, **attributes)
:param *components: any components that should be nested in this element :param **attributes: any attributes you want to give to this element
source code

Inherited from DIV: __delitem__, __getitem__, __len__, __nonzero__, __setitem__, __str__, append, element, elements, insert, update, xml

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__

Class Variables [hide private]
  tag = 'div'
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, component, **attributes)
(Constructor)

source code 

:param *components: any components that should be nested in this element :param **attributes: any attributes you want to give to this element

:raises SyntaxError: when a stand alone tag receives components

Overrides: object.__init__
(inherited documentation)