[Django] #21201: Let ClearableFileInput work with other fields

13 views
Skip to first unread message

Django

unread,
Sep 30, 2013, 10:54:32 AM9/30/13
to django-...@googlegroups.com
#21201: Let ClearableFileInput work with other fields
-----------------------------+--------------------
Reporter: vzima | Owner: nobody
Type: New feature | Status: new
Component: Forms | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------
`ClearableFileInput` is very useful widget, problem is that it can only be
used with `FileField` as it only expects `FieldFile` as an initial value.

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.

Django

unread,
Oct 1, 2013, 3:11:49 AM10/1/13
to django-...@googlegroups.com
#21201: Let ClearableFileInput work with other fields
-----------------------------+------------------------------------

Reporter: vzima | 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: 1 | Patch needs improvement: 0

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

* 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>

Django

unread,
Oct 1, 2013, 3:12:51 AM10/1/13
to django-...@googlegroups.com
#21201: Let ClearableFileInput work with other fields
-----------------------------+------------------------------------

Reporter: vzima | Owner: nobody
Type: New feature | Status: new
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1

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

* needs_docs: 0 => 1


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

Django

unread,
Oct 7, 2013, 4:52:09 AM10/7/13
to django-...@googlegroups.com
#21201: Let ClearableFileInput work with other fields
-----------------------------+------------------------------------

Reporter: vzima | Owner: nobody
Type: New feature | Status: new
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------

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>

Django

unread,
Oct 7, 2013, 5:11:34 AM10/7/13
to django-...@googlegroups.com
#21201: Let ClearableFileInput work with other fields
-----------------------------+------------------------------------

Reporter: vzima | Owner: nobody
Type: New feature | Status: new
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------

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>

Django

unread,
Oct 7, 2013, 5:36:14 AM10/7/13
to django-...@googlegroups.com
#21201: Let ClearableFileInput work with other fields
-----------------------------+------------------------------------

Reporter: vzima | Owner: nobody
Type: New feature | Status: new
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------

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>

Django

unread,
Oct 25, 2013, 4:46:58 AM10/25/13
to django-...@googlegroups.com
#21201: Let ClearableFileInput work with other fields
-----------------------------+------------------------------------
Reporter: vzima | Owner: vzima
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: 0 | UI/UX: 0
-----------------------------+------------------------------------
Changes (by vzima):

* 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>

Django

unread,
Aug 13, 2014, 9:04:50 AM8/13/14
to django-...@googlegroups.com
#21201: Let ClearableFileInput work with other fields
-----------------------------+------------------------------------
Reporter: vzima | Owner: vzima
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 timgraham):

* 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>

Django

unread,
Aug 29, 2014, 4:02:57 AM8/29/14
to django-...@googlegroups.com
#21201: Let ClearableFileInput work with other fields
-----------------------------+------------------------------------
Reporter: vzima | Owner: vzima
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: 0 | UI/UX: 0
-----------------------------+------------------------------------
Changes (by vzima):

* needs_better_patch: 1 => 0


Comment:

Patch rebased on master and updated.

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

Django

unread,
Aug 29, 2014, 9:42:58 AM8/29/14
to django-...@googlegroups.com
#21201: Let ClearableFileInput work with other fields
-----------------------------+------------------------------------
Reporter: vzima | Owner: vzima
Type: New feature | Status: closed
Component: Forms | 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: 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>

Reply all
Reply to author
Forward
0 new messages