Opened 15 years ago

Closed 13 years ago

#13086 closed Uncategorized (wontfix)

Field.get_choices() shouldn't add blank_choice if there is an equivalent in self.choices

Reported by: skoom Owned by: nobody
Component: Forms Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Design decision needed
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

This will allow someone to override the blank choice (e.g. BLANK_CHOICE_DASH) easily by having (,'Custom Value') in their list of choices

Attachments (1)

choices.diff (648 bytes ) - added by skoom 15 years ago.
diff patch

Download all attachments as: .zip

Change History (7)

comment:1 by skoom, 15 years ago

Formatting changed the description, sorry,

I mean ("","Custom Value")

by skoom, 15 years ago

Attachment: choices.diff added

diff patch

comment:2 by skoom, 15 years ago

Has patch: set

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

Needs tests: set
Resolution: wontfix
Status: newclosed
Triage Stage: UnreviewedAccepted

Marking wontfix because there are already ways to do this; we don't need another.

in reply to:  3 comment:4 by skoom, 15 years ago

Replying to russellm:

Marking wontfix because there are already ways to do this; we don't need another.

How can I do it? I have 14 (two for each day) TimeField with 24 (hourly) choices and one blank choice I want to be 'Not Available'

Is there an easy way to do this without having to redefine all 14 fields in the ModelForm?

comment:5 by theaspect@…, 13 years ago

Component: Core (Other)Forms
Easy pickings: unset
Resolution: wontfix
Severity: Normal
Status: closedreopened
Triage Stage: AcceptedDesign decision needed
Type: Uncategorized
UI/UX: unset
Version: SVN1.3

I've reopened this ticket with "design decision needed" because today aren't easy way to define blank_choice for ChoiceField, TypedChoiceField other than overriding choicefield or patching fields in init

related thread:
http://groups.google.com/group/django-users/browse_thread/thread/f40d160714346979

russellm closed ticked but didn't suggest any simple way.

comment:6 by Paul McMillan, 13 years ago

Resolution: wontfix
Status: reopenedclosed

And I'm re-closing it because you didn't follow proper procedure. Bring it up on the django-dev mailing list if you think it is really a problem, don't re-open a ticket closed by a core dev without permission.

Last edited 13 years ago by Paul McMillan (previous) (diff)
Note: See TracTickets for help on using tickets.
Back to Top