Code

Opened 7 years ago

Closed 7 years ago

#3114 closed defect (fixed)

[patch] invalid handling of MultipleChoice field

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

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

Download all attachments as: .zip

Change History (7)

Changed 7 years ago by Honza Král <Honza.Kral@…>

tests that fail for the current SVN version

Changed 7 years ago by Honza Král <Honza.Kral@…>

patch to correct the behaviour

comment:1 Changed 7 years ago by adrian

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

Changed 7 years ago by Honza Král <Honza.Kral@…>

patch against version 4194

Changed 7 years ago by Honza Král <Honza.Kral@…>

patch against version 4194

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

  • Cc massimiliano.ravelli@… added

comment:3 Changed 7 years ago by adrian

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

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

Add Comment

Modify Ticket

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


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

 
Note: See TracTickets for help on using tickets.