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)
Change History (7)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
Has patch: | set |
---|
follow-up: 4 comment:3 by , 15 years ago
Needs tests: | set |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
Triage Stage: | Unreviewed → Accepted |
Marking wontfix because there are already ways to do this; we don't need another.
comment:4 by , 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 , 13 years ago
Component: | Core (Other) → Forms |
---|---|
Easy pickings: | unset |
Resolution: | wontfix |
Severity: | → Normal |
Status: | closed → reopened |
Triage Stage: | Accepted → Design decision needed |
Type: | → Uncategorized |
UI/UX: | unset |
Version: | SVN → 1.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 , 13 years ago
Resolution: | → wontfix |
---|---|
Status: | reopened → closed |
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.
Formatting changed the description, sorry,
I mean ("","Custom Value")