I think the goal of BEAUTIFY() helper is to nicely display python lists and 
dicts.
See documentation in html.py :
class BEAUTIFY(DIV):
    """
     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;vertical-align:top">hello</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.
    Two special attributes are
    :sorted: a function that takes the dict and returned sorted keys
    :keyfilter: a funciton that takes a key and returns its representation
                or None if the key is to be skipped. By default 
key[:1]=='_' is skipped.
    """



It is not very clear what you want to beautify. If your objects 
"hits_xxx_yy" are lists or tuples, I would only expand them in the UL:
UL(*hits_xxx_yy,_class='hfm')



Le vendredi 14 décembre 2012 18:09:36 UTC+1, praveen krishna a écrit :
>
> Hi,
>   One of my form returns UL .I want to apply BEAUTIFY helper on this ,what 
> is the possible syntax.
>  part of code where I like to apply  BEAUTIFY  
>     return DIV(form,UL((hits_forward_mismatch),_class = 
> 'hfm'),UL((hits_loc_forward),_class='hlf'),UL((hits_loc_backward),_class='hlb'))
>
>

-- 



Reply via email to