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.
* 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>
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>
* cc: alasdair@… (added)
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/24191#comment:3>
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>
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>
* 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>
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>
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>
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>