[Django] #28458: Factor out ModelMultipleChoiceField.validate_choices

10 views
Skip to first unread message

Django

unread,
Aug 1, 2017, 10:30:46 AM8/1/17
to django-...@googlegroups.com
#28458: Factor out ModelMultipleChoiceField.validate_choices
-----------------------------------------+------------------------
Reporter: Daniel Hahler | Owner: nobody
Type: New feature | Status: new
Component: Forms | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
I've done this initially in the context of
https://code.djangoproject.com/ticket/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.

The patch with documentation and tests exists at
https://github.com/django/django/pull/7181 already.

--
Ticket URL: <https://code.djangoproject.com/ticket/28458>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 1, 2017, 2:01:14 PM8/1/17
to django-...@googlegroups.com
#28458: Add ModelMultipleChoiceField.validate_choices()
-------------------------------+------------------------------------

Reporter: Daniel Hahler | Owner: nobody
Type: New feature | Status: new
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by Tim Graham):

* stage: Unreviewed => Accepted


Old description:

> I've done this initially in the context of
> https://code.djangoproject.com/ticket/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.
>
> The patch with documentation and tests exists at
> https://github.com/django/django/pull/7181 already.

New description:

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.

[https://github.com/django/django/pull/7181 PR]

--

--
Ticket URL: <https://code.djangoproject.com/ticket/28458#comment:1>

Django

unread,
Aug 7, 2017, 7:54:25 PM8/7/17
to django-...@googlegroups.com
#28458: Add ModelMultipleChoiceField.validate_choices()
-------------------------------+------------------------------------

Reporter: Daniel Hahler | Owner: nobody
Type: New feature | Status: new
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by Tim Graham):

* needs_better_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/28458#comment:2>

Django

unread,
Aug 9, 2018, 7:21:25 PM8/9/18
to django-...@googlegroups.com
#28458: Add ModelMultipleChoiceField.validate_choices()
-------------------------------+------------------------------------

Reporter: Daniel Hahler | Owner: nobody
Type: New feature | Status: new
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------

Comment (by Zach Bresser):

Replying to [comment:2 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?

--
Ticket URL: <https://code.djangoproject.com/ticket/28458#comment:3>

Django

unread,
Aug 13, 2018, 6:52:13 PM8/13/18
to django-...@googlegroups.com
#28458: Add ModelMultipleChoiceField.validate_choices()
-------------------------------+------------------------------------

Reporter: Daniel Hahler | Owner: nobody
Type: New feature | Status: new
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------

Comment (by Daniel Hahler):

Zach,

please feel free to pick it up.

Thanks!

--
Ticket URL: <https://code.djangoproject.com/ticket/28458#comment:4>

Django

unread,
Apr 13, 2019, 8:55:45 AM4/13/19
to django-...@googlegroups.com
#28458: Add ModelMultipleChoiceField.validate_choices()
-------------------------------------+-------------------------------------
Reporter: Daniel Hahler | Owner: José
| Manuel Valdivia Romero
Type: New feature | Status: assigned
Component: Forms | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by José Manuel Valdivia Romero):

* owner: nobody => José Manuel Valdivia Romero
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/28458#comment:5>

Django

unread,
Feb 12, 2021, 1:33:51 AM2/12/21
to django-...@googlegroups.com
#28458: Add ModelMultipleChoiceField.validate_choices()
-------------------------------+------------------------------------
Reporter: Daniel Hahler | Owner: (none)

Type: New feature | Status: new
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by David Smith):

* owner: José Manuel Valdivia Romero => (none)
* status: assigned => new
* easy: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/28458#comment:6>

Django

unread,
Feb 20, 2021, 8:57:43 AM2/20/21
to django-...@googlegroups.com
#28458: Add ModelMultipleChoiceField.validate_choices()
-------------------------------+------------------------------------
Reporter: Daniel Hahler | Owner: (none)
Type: New feature | Status: new
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
-------------------------------+------------------------------------

Comment (by gasparb16):

Hi,

I would like to fix the review comments and work on this ticket.
Should I open a new PR with my changes?

--
Ticket URL: <https://code.djangoproject.com/ticket/28458#comment:7>

Django

unread,
Feb 21, 2021, 2:25:20 PM2/21/21
to django-...@googlegroups.com
#28458: Add ModelMultipleChoiceField.validate_choices()
-------------------------------+-------------------------------------
Reporter: Daniel Hahler | Owner: gasparb16

Type: New feature | Status: assigned
Component: Forms | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
-------------------------------+-------------------------------------
Changes (by David Smith):

* owner: (none) => gasparb16


* status: new => assigned


Comment:

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. 🙂

--
Ticket URL: <https://code.djangoproject.com/ticket/28458#comment:8>

Django

unread,
Feb 25, 2021, 4:15:52 AM2/25/21
to django-...@googlegroups.com
#28458: Add ModelMultipleChoiceField.validate_choices()
-------------------------------+-------------------------------------
Reporter: Daniel Hahler | Owner: gasparb16
Type: New feature | Status: assigned
Component: Forms | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 1 => 0


Comment:

[https://github.com/django/django/pull/14033 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/28458#comment:9>

Django

unread,
Feb 25, 2021, 4:33:05 AM2/25/21
to django-...@googlegroups.com
#28458: Add ModelMultipleChoiceField.validate_choices()
-------------------------------+-------------------------------------
Reporter: Daniel Hahler | Owner: gasparb16
Type: New feature | Status: assigned
Component: Forms | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 1 | UI/UX: 0
-------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/28458#comment:10>

Django

unread,
Mar 2, 2021, 3:48:47 AM3/2/21
to django-...@googlegroups.com
#28458: Add ModelMultipleChoiceField.validate_choices()
-------------------------------+-------------------------------------
Reporter: Daniel Hahler | Owner: gasparb16
Type: New feature | Status: closed
Component: Forms | Version: master
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage: Accepted

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
-------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* status: assigned => closed
* resolution: => wontfix


Comment:

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/28458#comment:11>

Reply all
Reply to author
Forward
0 new messages