Opened 17 years ago

Closed 16 years ago

#6001 closed (fixed)

Inconsistency between Select and SelectMultiple

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

Description

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@…> 17 years ago.

Download all attachments as: .zip

Change History (3)

by Petr Marhoun <petr.marhoun@…>, 17 years ago

Attachment: 00-select-multiple.diff added

comment:1 by Chris Beaven, 17 years ago

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 by Petr Marhoun <petr.marhoun@…>, 16 years ago

Resolution: fixed
Status: newclosed

It was fixed in [7977].

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