Ticket #6001: 00-select-multiple.diff

File 00-select-multiple.diff, 701 bytes (added by Petr Marhoun <petr.marhoun@…>, 7 years ago)
  • django/newforms/widgets.py

    === modified file 'django/newforms/widgets.py'
     
    334334        value = data.get(name, None)
    335335        return {u'2': True, u'3': False, True: True, False: False}.get(value, None)
    336336
    337 class SelectMultiple(Widget):
    338     def __init__(self, attrs=None, choices=()):
    339         super(SelectMultiple, self).__init__(attrs)
    340         # choices can be any iterable
    341         self.choices = choices
    342 
     337class SelectMultiple(Select):
    343338    def render(self, name, value, attrs=None, choices=()):
    344339        if value is None: value = []
    345340        final_attrs = self.build_attrs(attrs, name=name)
Back to Top