Django

Code

Ticket #3114 (closed: fixed)

Opened 2 years ago

Last modified 2 years ago

[patch] invalid handling of MultipleChoice field

Reported by: Honza Král <Honza.Kral@gmail.com> Assigned to: adrian
Milestone: Component: Forms
Version: SVN Keywords:
Cc: massimiliano.ravelli@gmail.com Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

multiple_choice_tests.patch (0.8 kB) - added by Honza Král <Honza.Kral@gmail.com> on 12/07/06 20:59:33.
tests that fail for the current SVN version
multiple_choice.patch (2.6 kB) - added by Honza Král <Honza.Kral@gmail.com> on 12/07/06 21:00:00.
patch to correct the behaviour
multiple_choice_4194.patch (1.5 kB) - added by Honza Král <Honza.Kral@gmail.com> on 12/12/06 15:37:46.
patch against version 4194
multiple_choice_tests_4194.patch (0.8 kB) - added by Honza Král <Honza.Kral@gmail.com> on 12/12/06 15:42:42.
patch against version 4194

Change History

12/07/06 20:59:33 changed by Honza Král <Honza.Kral@gmail.com>

  • attachment multiple_choice_tests.patch added.

tests that fail for the current SVN version

12/07/06 21:00:00 changed by Honza Král <Honza.Kral@gmail.com>

  • attachment multiple_choice.patch added.

patch to correct the behaviour

12/07/06 23:54:14 changed by adrian

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

12/12/06 15:37:46 changed by Honza Král <Honza.Kral@gmail.com>

  • attachment multiple_choice_4194.patch added.

patch against version 4194

12/12/06 15:42:42 changed by Honza Král <Honza.Kral@gmail.com>

  • attachment multiple_choice_tests_4194.patch added.

patch against version 4194

12/12/06 16:47:26 changed by Massimiliano Ravelli <massimiliano.ravelli@gmail.com>

  • cc set to massimiliano.ravelli@gmail.com.

12/13/06 00:26:04 changed by adrian

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #3114 ([patch] invalid handling of MultipleChoice field)




Change Properties
Action