Opened 7 years ago

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

Download all attachments as: .zip

Change History (3)

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

comment:1 Changed 6 years ago by SmileyChris

  • Needs documentation unset
  • Needs tests set
  • Patch needs improvement unset
  • Summary changed from Inconsistency between Select and SelectMultiply to Inconsistency between Select and SelectMultiple
  • Triage Stage changed from Unreviewed to Accepted

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

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

  • Resolution set to fixed
  • Status changed from new to closed

It was fixed in [7977].

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.