[Django] #26837: ModelMultipleChoiceField's documentation doesn't mention whether it supports to_field_name

39 views
Skip to first unread message

Django

unread,
Jul 4, 2016, 11:11:03 AM7/4/16
to django-...@googlegroups.com
#26837: ModelMultipleChoiceField's documentation doesn't mention whether it
supports to_field_name
------------------------------------------------+------------------------
Reporter: bmispelon | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 1.9
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
------------------------------------------------+------------------------
The documentation for `ModelMultipleChoiceField` [1] doesn't mention
whether it supports the `to_field_name` parameter like `ModelChoideField`
[2].

From a quick test, it seems that it does.

This should be documented, and we should also make sure it's tested in
case it's not.

[1]
https://docs.djangoproject.com/en/dev/ref/forms/fields/#modelmultiplechoicefield
[2]
https://docs.djangoproject.com/en/dev/ref/forms/fields/#django.forms.ModelChoiceField.to_field_name

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

Django

unread,
Jul 4, 2016, 11:32:36 AM7/4/16
to django-...@googlegroups.com
#26837: ModelMultipleChoiceField's documentation doesn't mention whether it
supports to_field_name
--------------------------------------+------------------------------------

Reporter: bmispelon | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

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

* version: 1.9 => master
* stage: Unreviewed => Accepted


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

Django

unread,
Jul 5, 2016, 4:06:01 PM7/5/16
to django-...@googlegroups.com
#26837: ModelMultipleChoiceField's documentation doesn't mention whether it
supports to_field_name
-------------------------------------+-------------------------------------
Reporter: bmispelon | Owner:
Type: | smarlowucf
Cleanup/optimization | Status: assigned

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

* status: new => assigned
* owner: nobody => smarlowucf


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

Django

unread,
Jul 5, 2016, 6:54:53 PM7/5/16
to django-...@googlegroups.com
#26837: ModelMultipleChoiceField's documentation doesn't mention whether it
supports to_field_name
-------------------------------------+-------------------------------------
Reporter: bmispelon | Owner:
Type: | smarlowucf
Cleanup/optimization | Status: assigned
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by smarlowucf):

I looked into the tests for this ticket and noticed that the
`to_field_name` argument is covered for both `ModelMultipleChoiceField`
and `ModelChoiceField`.

https://github.com/django/django/blob/c9ae09addffb839403312131d4251e9d8b454508/tests/model_forms/tests.py#L2404

However, I noticed that the `empty_label` argument is not covered for
`ModelChoiceField`.

Is it okay to add a test for this argument as part of this ticket or
should a new ticket be created?

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

Django

unread,
Jul 8, 2016, 11:30:33 AM7/8/16
to django-...@googlegroups.com
#26837: ModelMultipleChoiceField's documentation doesn't mention whether it
supports to_field_name
-------------------------------------+-------------------------------------
Reporter: bmispelon | Owner:
Type: | smarlowucf
Cleanup/optimization | Status: closed
Component: Documentation | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted

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

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


Comment:

In [changeset:"8b9e16ec858c23cb65ea5de95f65a71b31521841" 8b9e16ec]:
{{{
#!CommitTicketReference repository=""
revision="8b9e16ec858c23cb65ea5de95f65a71b31521841"
Fixed #26837 -- Documented ModelMultipleChoiceField.to_field_name
}}}

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

Django

unread,
Jul 8, 2016, 11:30:41 AM7/8/16
to django-...@googlegroups.com
#26837: ModelMultipleChoiceField's documentation doesn't mention whether it
supports to_field_name
-------------------------------------+-------------------------------------
Reporter: bmispelon | Owner:
Type: | smarlowucf
Cleanup/optimization | Status: closed
Component: Documentation | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"fda151e512a7da8a45416da3828f2109486b6822" fda151e5]:
{{{
#!CommitTicketReference repository=""
revision="fda151e512a7da8a45416da3828f2109486b6822"
[1.10.x] Fixed #26837 -- Documented ModelMultipleChoiceField.to_field_name

Backport of 8b9e16ec858c23cb65ea5de95f65a71b31521841 from master
}}}

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

Django

unread,
Jul 8, 2016, 11:30:42 AM7/8/16
to django-...@googlegroups.com
#26837: ModelMultipleChoiceField's documentation doesn't mention whether it
supports to_field_name
-------------------------------------+-------------------------------------
Reporter: bmispelon | Owner:
Type: | smarlowucf
Cleanup/optimization | Status: closed
Component: Documentation | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"d5f1736dbd904096608cb35caf37decce9215915" d5f1736d]:
{{{
#!CommitTicketReference repository=""
revision="d5f1736dbd904096608cb35caf37decce9215915"
[1.9.x] Fixed #26837 -- Documented ModelMultipleChoiceField.to_field_name

Backport of 8b9e16ec858c23cb65ea5de95f65a71b31521841 from master
}}}

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

Reply all
Reply to author
Forward
0 new messages