Opened 7 years ago
Closed 4 years ago
#28458 closed New feature (wontfix)
Add ModelMultipleChoiceField.validate_choices()
Reported by: | Daniel Hahler | Owned by: | gasparb16 |
---|---|---|---|
Component: | Forms | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | yes | UI/UX: | no |
Description (last modified by )
I've done this initially in the context of #27148.
While it is not required to work around this anymore, it still is useful for customization and was ACKed in https://github.com/django/django/pull/7181#issuecomment-261079604.
Change History (10)
comment:1 by , 7 years ago
Description: | modified (diff) |
---|---|
Summary: | Factor out ModelMultipleChoiceField.validate_choices → Add ModelMultipleChoiceField.validate_choices() |
Triage Stage: | Unreviewed → Accepted |
follow-up: 3 comment:2 by , 7 years ago
Patch needs improvement: | set |
---|
comment:3 by , 6 years ago
comment:6 by , 4 years ago
Easy pickings: | set |
---|---|
Owner: | removed |
comment:7 by , 4 years ago
Hi,
I would like to fix the review comments and work on this ticket.
Should I open a new PR with my changes?
comment:8 by , 4 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
Hi gasparb16 -- glad to hear of your interest in taking on this ticket. Please do open a new PR over at GitHub when you are ready to do so.
In the meantime I'll allocate the ticket to you. Please go ahead and assign tickets you want to work on to yourself in future. 🙂
comment:10 by , 4 years ago
Patch needs improvement: | set |
---|
comment:11 by , 4 years ago
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
We should have a valid use case if we want to add a new hook. validate_choices()
can be used to avoid a queryset evaluation, but I'm not sure it's enough to justify adding it. It's really niche and was more of a workaround than a real need (see #27148). I'm going to say "wontfix" unless there's a more legitimate use-case.
Replying to Tim Graham:
Tim,
I see Blueyed is fairly silent on this. Would you mind if I picked up from his changes and fixed some of the things you pointed out?