forked from DGNum/gestioCOF
Fix use of Widget.build_attrs in TriStateCheckbox
Signature changed in Django 1.11.
This commit is contained in:
parent
a6f52cfdc5
commit
dfb9ccb0af
1 changed files with 2 additions and 1 deletions
|
@ -20,6 +20,7 @@ class TriStateCheckbox(Widget):
|
|||
def render(self, name, value, attrs=None, choices=()):
|
||||
if value is None:
|
||||
value = 'none'
|
||||
final_attrs = self.build_attrs(attrs, value=value)
|
||||
attrs['value'] = value
|
||||
final_attrs = self.build_attrs(self.attrs, attrs)
|
||||
output = ["<span class=\"tristate\"%s></span>" % flatatt(final_attrs)]
|
||||
return mark_safe('\n'.join(output))
|
||||
|
|
Loading…
Reference in a new issue