django 1.11: adapt PickerWidgetMixin (#21489)

https://code.djangoproject.com/ticket/15667
django commit: b52c73008a9d67e9ddbb841872dc15cdd3d6ee01
This commit is contained in:
Emmanuel Cazenave 2018-07-31 14:22:47 +02:00 committed by Frédéric Péters
parent d537656aca
commit a3943e55d7
1 changed files with 1 additions and 0 deletions

View File

@ -105,6 +105,7 @@ class PickerWidgetMixin(object):
return format
def render(self, name, value, attrs=None):
attrs = attrs or {}
final_attrs = self.build_attrs(attrs)
final_attrs['class'] = "controls input-append date"
rendered_widget = super(PickerWidgetMixin, self).render(name, value, final_attrs)