Opened 15 years ago

Closed 14 years ago

Last modified 13 years ago

#12398 closed (fixed)

Add `TypedMultipleChoiceField` to compliment `TypedChoiceField`.

Reported by: Tai Lee Owned by: nobody
Component: Forms Version: dev
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Patch includes docs and tests. This could also fix #5481.

Attachments (2)

12398-TypedMultipleChoiceField-r11901.diff (6.8 KB ) - added by Tai Lee 15 years ago.
12398-TypedMultipleChoiceField-r14586.diff (7.1 KB ) - added by anonymous 14 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 by Tai Lee, 15 years ago

comment:2 by Russell Keith-Magee, 15 years ago

Triage Stage: UnreviewedAccepted
Version: SVN

comment:3 by Luke Plant, 14 years ago

Patch needs improvement: set

Looks fairly good to me. A few things:

  • I would change the comment that starts "Hack alert", because I don't think it is a hack, and I think the comment about catching both exceptions is incorrect - it catches one and raises another.
  • The patch doesn't apply cleanly at the moment. The tests have moved.
  • The test names are strange - why do they start at 70 instead of 1?

With these addressed, feel free to move to Ready For Checkin.

comment:4 by Tai Lee, 14 years ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin
Version: SVN

I've updated the patch according to your feedback. The underlying implementation changed a fair bit (to use to_python() instead of clean()), so the "hack" comment is gone as it was no longer relevant, anyway. The tests were named for consistency with the surrounding tests back then, which had a unique sequential number suffix for all tests in the module, rather than for each group of tests.

I think we can also mark #5481 as fixed or invalid (with instruction to use TypedMultipleChoiceField) now?

comment:5 by Tai Lee, 14 years ago

milestone: 1.3

comment:6 by Russell Keith-Magee, 14 years ago

Resolution: fixed
Status: newclosed

(In [14829]) Fixed #12398 -- Added a TypedMultipleChoiceField. Thanks to Tai Lee.

comment:7 by Tim Graham, 14 years ago

(In [15082]) Refs #12398 - TypedMultipleChoiceField is new in Django 1.3

comment:8 by Jacob, 13 years ago

milestone: 1.3

Milestone 1.3 deleted

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