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)
"As nearly as possible, no nationalist ever thinks, talks, or writes about anything except the superiority of his own power unit. It is difficult if not impossible for any nationalist to conceal his allegiance. The smallest slur upon his own unit, or any implied praise of a rival organization, fills him with uneasiness which he can relieve only by making some sharp retort"
George Orwell