Pass renderer to SelectWidget.render()

Required for Django 1.11 compatibility. Apparently
DynamicSelectWidget.render() receives it (through kwargs) and
tries to pass the parameter to its parent's method, but then
it fails (leading to exceptions in the rendering).

Closes-Bug: #1707660
Change-Id: I25e294a1c2f721a2f57dd50acb4c5e408b6187f9
This commit is contained in:
Luigi Toscano 2017-07-31 16:47:14 +02:00
parent 92a7014521
commit 5b53b8c17d

View File

@ -224,7 +224,7 @@ class SelectWidget(widgets.Widget):
self.transform_html_attrs = transform_html_attrs
super(SelectWidget, self).__init__(attrs)
def render(self, name, value, attrs=None):
def render(self, name, value, attrs=None, renderer=None):
if value is None:
value = ''
final_attrs = self.build_attrs(attrs, name=name)