Opened 18 years ago

Closed 18 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

Description

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 18 years ago.

Download all attachments as: .zip

Change History (3)

by Massimiliano Ravelli, 18 years ago

Attachment: multiple_choice_tests.patch added

comment:1 by anonymous, 18 years ago

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

comment:2 by Massimiliano Ravelli <massimiliano.ravelli@…>, 18 years ago

Resolution: duplicate
Status: newclosed

Closing as duplicate of #3114 and #3131.

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