[Django] #24191: form.changed_data appears to be undocumented

23 views
Skip to first unread message

Django

unread,
Jan 21, 2015, 4:27:56 AM1/21/15
to django-...@googlegroups.com
#24191: form.changed_data appears to be undocumented
-------------------------------+--------------------
Reporter: rhertzog | Owner: nobody
Type: New feature | Status: new
Component: Documentation | Version: 1.7
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
https://docs.djangoproject.com/en/1.7/ref/forms/api/ does not document
form.changed_data

Yet this field appears to be widely used... it would be nice to see this
fixed.

This has been reported by Björn Påhlsson to Debian in
https://bugs.debian.org/616331 (I put him in CC).

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

Django

unread,
Jan 21, 2015, 9:13:38 AM1/21/15
to django-...@googlegroups.com
#24191: form.changed_data appears to be undocumented
-------------------------------+------------------------------------

Reporter: rhertzog | Owner: nobody
Type: New feature | 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: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by timgraham):

* needs_better_patch: => 0
* version: 1.7 => master
* needs_tests: => 0
* needs_docs: => 0
* stage: Unreviewed => Accepted


Comment:

Just because something is "widely used" isn't a justification for making
it a public API, but we recently documented `Form.has_changed()` so it
probably makes sense to document this as well. This method relies on
`field.show_hidden_initial` which also isn't documented so we might want
to consider that as well.

We should likely address the comment in the `changed_data` property `XXX:
For now we're asking the individual fields ...` before documenting this
though as if we make that change it might be easier to do so before
documenting in case there are any backwards compatibility concerns.

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

Django

unread,
Jun 4, 2015, 11:33:54 AM6/4/15
to django-...@googlegroups.com
#24191: form.changed_data appears to be undocumented
-------------------------------+------------------------------------

Reporter: rhertzog | Owner: nobody
Type: New feature | 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: 0 | UI/UX: 0
-------------------------------+------------------------------------

Comment (by alasdairnicol):

I have created a pull request https://github.com/django/django/pull/4768
which documents form.changed_data.

I haven't addressed the comment that tim refers to. Changing the
implementation of ``has_changed`` to use a hidden field would have
backwards incompatibility implications for `form.has_changed()` (which is
documented) as well.

I may have misunderstood the suggestion in the comments, but am not sure
that the the hidden field approach is better. Not every form is
instantiated from a `request.POST` or request.GET that contains a hidden
field.

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

Django

unread,
Jun 4, 2015, 11:39:05 AM6/4/15
to django-...@googlegroups.com
#24191: form.changed_data appears to be undocumented
-------------------------------+------------------------------------

Reporter: rhertzog | Owner: nobody
Type: New feature | Status: new
Component: Documentation | 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 alasdairnicol):

* cc: alasdair@… (added)
* has_patch: 0 => 1


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

Django

unread,
Jun 4, 2015, 11:49:36 AM6/4/15
to django-...@googlegroups.com
#24191: form.changed_data appears to be undocumented
-------------------------------+------------------------------------

Reporter: rhertzog | Owner: nobody
Type: New feature | Status: new
Component: Documentation | 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
-------------------------------+------------------------------------

Comment (by timgraham):

Let's remove that comment in the code then. Same PR separate commit would
be fine.

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

Django

unread,
Jun 4, 2015, 12:29:49 PM6/4/15
to django-...@googlegroups.com
#24191: form.changed_data appears to be undocumented
-------------------------------+------------------------------------

Reporter: rhertzog | Owner: nobody
Type: New feature | Status: new
Component: Documentation | 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
-------------------------------+------------------------------------

Comment (by alasdairnicol):

Replying to [comment:4 timgraham]:


> Let's remove that comment in the code then. Same PR separate commit
would be fine.

I've added another commit to the pull request that removes the comment.

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

Django

unread,
Jun 4, 2015, 1:51:40 PM6/4/15
to django-...@googlegroups.com
#24191: form.changed_data appears to be undocumented
-------------------------------+------------------------------------
Reporter: rhertzog | Owner: nobody
Type: New feature | Status: closed
Component: Documentation | Version: master
Severity: Normal | Resolution: fixed

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 <timograham@…>):

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


Comment:

In [changeset:"5c98223f39e5cf92c603a08e7ed70d57e565a5a3" 5c98223]:
{{{
#!CommitTicketReference repository=""
revision="5c98223f39e5cf92c603a08e7ed70d57e565a5a3"
Fixed #24191 -- Documented Form.changed_data

Thanks rhertzog and Björn Påhlsson for the suggestion.
}}}

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

Django

unread,
Jun 4, 2015, 1:51:40 PM6/4/15
to django-...@googlegroups.com
#24191: form.changed_data appears to be undocumented
-------------------------------+------------------------------------
Reporter: rhertzog | Owner: nobody

Type: New feature | Status: closed
Component: Documentation | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

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

In [changeset:"5987b3c46d5a6948737627d294d95ed54d49eae6" 5987b3c]:
{{{
#!CommitTicketReference repository=""
revision="5987b3c46d5a6948737627d294d95ed54d49eae6"
Removed comment from Form.changed_data; refs #24191
}}}

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

Django

unread,
Jun 4, 2015, 1:52:27 PM6/4/15
to django-...@googlegroups.com
#24191: form.changed_data appears to be undocumented
-------------------------------+------------------------------------
Reporter: rhertzog | Owner: nobody

Type: New feature | Status: closed
Component: Documentation | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

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

In [changeset:"cccb7b49dc2bfdbebae170ebfeee1abf2a731552" cccb7b49]:
{{{
#!CommitTicketReference repository=""
revision="cccb7b49dc2bfdbebae170ebfeee1abf2a731552"
[1.8.x] Fixed #24191 -- Documented Form.changed_data

Thanks rhertzog and Björn Påhlsson for the suggestion.

Backport of 5c98223f39e5cf92c603a08e7ed70d57e565a5a3 from master
}}}

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

Django

unread,
Jun 4, 2015, 1:53:49 PM6/4/15
to django-...@googlegroups.com
#24191: form.changed_data appears to be undocumented
-------------------------------+------------------------------------
Reporter: rhertzog | Owner: nobody

Type: New feature | Status: closed
Component: Documentation | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

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

In [changeset:"2aa65460d54b8f8cbca2ae7b7d97bfe219e88929" 2aa6546]:
{{{
#!CommitTicketReference repository=""
revision="2aa65460d54b8f8cbca2ae7b7d97bfe219e88929"
[1.8.x] Removed comment from Form.changed_data; refs #24191

Backport of 5987b3c46d5a6948737627d294d95ed54d49eae6 from master
}}}

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

Reply all
Reply to author
Forward
0 new messages