I propose a decomposition (see patch) which allows easy modification to
use this widget with other fields.
Example: File input is used over data which are stored in database.
This problem is remotely connected with #15667 which may (or may not)
solve this issue.
--
Ticket URL: <https://code.djangoproject.com/ticket/21201>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: EvilDMP (added)
* needs_better_patch: => 0
* needs_docs: => 0
* needs_tests: => 1
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/21201#comment:1>
* needs_docs: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/21201#comment:2>
Comment (by vzima):
Replying to [comment:2 EvilDMP]:
Do you have in mind any particular changes in documentation beside note in
changelog? Current documentation does not describe these internals of the
widget.
--
Ticket URL: <https://code.djangoproject.com/ticket/21201#comment:3>
Comment (by EvilDMP):
docs/forms/ref/widgets.txt documents ClearableFileInput, but not the
internals; I don't see any particular need to document internals of
widgets. Perhaps an example of usage would be helpful.
--
Ticket URL: <https://code.djangoproject.com/ticket/21201#comment:4>
Comment (by EvilDMP):
This patch does change the behaviour of the widget, so we will need to
understand any backwards-compatibility implications of it.
--
Ticket URL: <https://code.djangoproject.com/ticket/21201#comment:5>
* status: new => assigned
* needs_docs: 1 => 0
* owner: nobody => vzima
* needs_tests: 1 => 0
Comment:
I have updated a patch and created pull request
https://github.com/django/django/pull/1807
--
Ticket URL: <https://code.djangoproject.com/ticket/21201#comment:6>
* needs_better_patch: 0 => 1
Comment:
I left comments for improvement on the PR. Please uncheck "Patch needs
improvement" when you update it, thanks.
--
Ticket URL: <https://code.djangoproject.com/ticket/21201#comment:7>
* needs_better_patch: 1 => 0
Comment:
Patch rebased on master and updated.
--
Ticket URL: <https://code.djangoproject.com/ticket/21201#comment:8>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"e622caaa857e74cef4fe7757b6e5b802af814788"]:
{{{
#!CommitTicketReference repository=""
revision="e622caaa857e74cef4fe7757b6e5b802af814788"
Fixed #21201 -- Improved customization of ClearableFileInput.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/21201#comment:9>