Opened 12 years ago

Closed 12 years ago

#3129 closed defect (duplicate)

MultipleChoiceField doesn't handle correctly QueryDict

Reported by: anonymous Owned by: Adrian Holovaty
Component: Forms Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


class SongForm(Form):
    composers = MultipleChoiceField(choices=[('J', 'John'), ('P', 'Paul')])

When I try to pass a request.POST to the form:

form = SongForm(request.POST)

If I check one or more options, it raises a ValidationError 'Enter a list of values.'.

Attachments (1)

multiple_choice_tests.patch (953 bytes) - added by Massimiliano Ravelli 12 years ago.

Download all attachments as: .zip

Change History (3)

Changed 12 years ago by Massimiliano Ravelli

Attachment: multiple_choice_tests.patch added

comment:1 Changed 12 years ago by anonymous

I've added a patch to the forms regression tests.
If you need a test case please let me now.

comment:2 Changed 12 years ago by Massimiliano Ravelli <massimiliano.ravelli@…>

Resolution: duplicate
Status: newclosed

Closing as duplicate of #3114 and #3131.

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