Add required param `renderer` to Widget.render
Added on Django 1.11 and required since 2.1 The renderer argument is added to the Widget.render() method. https://docs.djangoproject.com/en/2.1/releases/1.11/#id2
This commit is contained in:
parent
7183174f4c
commit
5a21f766b4
|
@ -18,8 +18,8 @@ class SpanWidget(forms.Widget):
|
||||||
self.display = kwargs.pop('display', None)
|
self.display = kwargs.pop('display', None)
|
||||||
super(SpanWidget, self).__init__(*args, **kwargs)
|
super(SpanWidget, self).__init__(*args, **kwargs)
|
||||||
|
|
||||||
def render(self, name, value, attrs=None):
|
def render(self, name, value, attrs=None, renderer=None):
|
||||||
final_attrs = self.build_attrs(attrs, name=name)
|
final_attrs = self.build_attrs(attrs, extra_attrs={'name':name})
|
||||||
original = self.original or value
|
original = self.original or value
|
||||||
display = original if self.display is None else self.display
|
display = original if self.display is None else self.display
|
||||||
# Display icon
|
# Display icon
|
||||||
|
|
Loading…
Reference in New Issue