﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
17981	attr property unexpectedly shared between widgets in MultiWidget	c v t	nobody	"
I have encountered the following method for making a widget that's just an existing widget with a custom class (from the [https://github.com/dyve/django-bootstrap-toolkit django-bootstrap-toolkit] project):
{{{
class FooWidget(forms.TextInput):                                               
  def render(self, name, value, attrs=None):                                    
    if not attrs:                                                               
      attrs = {}                                                                
    attrs['class'] = 'flibble'                                                  
    return super(FooWidget, self).render(name, value, attrs)
}}}
(code to only add class conditionally omitted for clarity).

I tried adding such a widget to another custom widget, based on `MultiWidget`:
{{{
class BarWidget(forms.MultiWidget):                          
  def __init__(self):
    widgets = (
      FooWidget(),                                                              
      forms.TextInput(),)                   
    super(BarWidget, self).__init__(widgets, None)           
}}}
but in the output, **both widgets are rendered with `class = 'flibble'`**. If the order of `widgets` reversed, only `FooWidget` has the applied class, as expected.

I can't see anything in the definition of `MultiWidget` which immediately explains this. Thoughts?

This is not a duplicate of #5851 (as far as I can tell)."	Bug	closed	Forms	1.4	Normal	duplicate			Unreviewed	0	0	0	0	1	0
