July 8th, 2009 posted by Bender Rodríguez
You create a form widget that extends the CheckboxSelectMultiple
class CheckboxSelectMultiple(widgets.CheckboxSelectMultiple):
"""
Simply adds a class to the ul element,
which allows the CSS to select it.
"""
def render(self, *args, **kwargs):
output = super(CheckboxSelectMultiple,
self).render(*args,**kwargs)
return mark_safe(output.replace(u'<ul>',
u'<ul class="checkbox- select">'))
0 Comments,
0 trackbacks
(Trackback URL)
"Gods are fragile things; they may be killed by a whiff of science or a dose of common sense."
Chapman Cohen