Opened 11 years ago

Closed 10 years ago

#6001 closed (fixed)

Inconsistency between Select and SelectMultiple

Reported by: Petr Marhoun <petr.marhoun@…> Owned by: nobody
Component: Forms Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: no
Easy pickings: UI/UX:


From django.newforms.widget.Select:

class Select(Widget):
    def __init__(self, attrs=None, choices=()):
        super(Select, self).__init__(attrs)
        # choices can be any iterable, but we may need to render this widget
        # multiple times. Thus, collapse it into a list so it can be consumed
        # more than once.
        self.choices = list(choices)

And from django.newforms.widget.SelectMultiply:

class SelectMultiple(Widget):
    def __init__(self, attrs=None, choices=()):
        super(SelectMultiple, self).__init__(attrs)
        # choices can be any iterable
        self.choices = choices

Should be choices collapsed? NullBooleanSelect inherits from Select - why doesn't SelectMultiply inherits from Select too?

Attachments (1)

00-select-multiple.diff (701 bytes) - added by Petr Marhoun <petr.marhoun@…> 11 years ago.

Download all attachments as: .zip

Change History (3)

Changed 11 years ago by Petr Marhoun <petr.marhoun@…>

Attachment: 00-select-multiple.diff added

comment:1 Changed 10 years ago by Chris Beaven

Needs tests: set
Summary: Inconsistency between Select and SelectMultiplyInconsistency between Select and SelectMultiple
Triage Stage: UnreviewedAccepted

Seems fair enough - add some tests to show what this is fixing and it's good to go.

comment:2 Changed 10 years ago by Petr Marhoun <petr.marhoun@…>

Resolution: fixed
Status: newclosed

It was fixed in [7977].

Note: See TracTickets for help on using tickets.
Back to Top