Opened 18 years ago

Closed 18 years ago

#3114 closed defect (fixed)

[patch] invalid handling of MultipleChoice field

Reported by: Honza Král <Honza.Kral@…> Owned by: Adrian Holovaty
Component: Forms Version: dev
Severity: normal Keywords:
Cc: massimiliano.ravelli@… Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

If I had a page with a MultipleChoiceField, it didn't get rendered properly.

The tests didn't show this because the test data were suppliad as normal dict's, where in real life you would have MultiValueDict which behave differently. I added the tests that show this behaviour as a separate patch.

(I also fixed a minor unicode-related bug in this patch - fields.py line 280)

Attachments (4)

multiple_choice_tests.patch (824 bytes ) - added by Honza Král <Honza.Kral@…> 18 years ago.
tests that fail for the current SVN version
multiple_choice.patch (2.6 KB ) - added by Honza Král <Honza.Kral@…> 18 years ago.
patch to correct the behaviour
multiple_choice_4194.patch (1.5 KB ) - added by Honza Král <Honza.Kral@…> 18 years ago.
patch against version 4194
multiple_choice_tests_4194.patch (854 bytes ) - added by Honza Král <Honza.Kral@…> 18 years ago.
patch against version 4194

Download all attachments as: .zip

Change History (7)

by Honza Král <Honza.Kral@…>, 18 years ago

Attachment: multiple_choice_tests.patch added

tests that fail for the current SVN version

by Honza Král <Honza.Kral@…>, 18 years ago

Attachment: multiple_choice.patch added

patch to correct the behaviour

comment:1 by Adrian Holovaty, 18 years ago

(In [4185]) Fixed small Unicode error in newforms. Thanks, Honza Kr?\195?\161l. Refs #3114

by Honza Král <Honza.Kral@…>, 18 years ago

Attachment: multiple_choice_4194.patch added

patch against version 4194

by Honza Král <Honza.Kral@…>, 18 years ago

patch against version 4194

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

Cc: massimiliano.ravelli@… added

comment:3 by Adrian Holovaty, 18 years ago

Resolution: fixed
Status: newclosed

(In [4196]) Fixed #3114 -- newforms MultipleChoiceField now handles MultiValueDicts properly. Thanks for the patch, Honza Kr?\195?\161l

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