Ejemplo n.º 1
0
def label(*args, inline=False, **kwargs):
    """
    A regular label, with an additional inline option that renders the <label>
    inline, if given.
    """
    elem = hp.label(*args, **kwargs)
    return elem.add_class("label-inline") if inline else label
Ejemplo n.º 2
0
 def vote_option(choice):
     kwargs = {'checked': True} if choice == voted else {}
     return Block([
         label([
             input_(value=choice.name, name=name, type='radio', **kwargs),
             choice.description,
         ]),
     ])