[Django] #19215: ImageField's “Currently” and “Clear” Sometimes Don't Appear

18 views
Skip to first unread message

Django

unread,
Oct 30, 2012, 6:46:41 PM10/30/12
to django-...@googlegroups.com
#19215: ImageField's “Currently” and “Clear” Sometimes Don't Appear
-----------------------------+------------------------
Reporter: nrogers64@… | Owner: nobody
Type: Bug | Status: new
Component: Forms | Version: 1.4
Severity: Normal | Keywords: ImageField
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 1
-----------------------------+------------------------
I have found scenarios where an ImageField's “Currently” and “Clear”
widgets don't appear. Here are the instructions to reproduce the
scenarios:

Create an app called "imagefield_bug" and paste this in its "models.py"
file:


{{{
from django.db import models


class ImageFieldBug(models.Model):
required_text_field = models.CharField(max_length=100)
optional_image = models.ImageField(upload_to='images/', blank=True,
null=True)

def __unicode__(self):
return self.required_text_field

}}}


Add the "imagefield_bug" app to your project's INSTALLED_APPS. Make sure
"django.contrib.admin" is also in INSTALLED_APPS while you're at it.

Make sure the admin lines in "urls.py" are uncommented.

Run these commands:


{{{
printf "from django.contrib import admin\nfrom models import
ImageFieldBug\n\nadmin.site.register(ImageFieldBug)\n" >
imagefield_bug/admin.py

python manage.py syncdb

python manage.py runserver
}}}


Go to the following URL, log in, fill out both fields correctly, and click
"Save and continue editing":

http://127.0.0.1:8000/admin/imagefield_bug/imagefieldbug/add/

Now you should see the "Currently" and "Clear" widgets. Choose a non-image
to upload and then click "Save". Now the "Currently" and "Clear" widgets
are gone, potentially misleading the user into thinking the original image
is gone forever.

Now click your browser's "Back" button, refresh the page, blank out the
"Required text field" field, and either check the "Clear" checkbox or
choose a valid image to upload. After that, click "Save". Again, the
"Currently" and "Clear" widgets will be gone.

See [https://groups.google.com/d/topic/django-
developers/3lpFZ380dzQ/discussion this django-developers discussion] for
more information.

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

Django

unread,
Oct 30, 2012, 6:48:26 PM10/30/12
to django-...@googlegroups.com
#19215: ImageField's “Currently” and “Clear” Sometimes Don't Appear
-----------------------------+------------------------------------

Reporter: nrogers64@… | Owner: nobody
Type: Bug | Status: new
Component: Forms | Version: 1.4
Severity: Normal | Resolution:
Keywords: ImageField | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* needs_better_patch: => 0
* needs_docs: => 0
* needs_tests: => 0
* stage: Unreviewed => Accepted


Comment:

Thanks for filing the report!

I've verified this behavior, and I think it is less-than-optimal. The path
to fixing it isn't entirely clear, though.

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

Django

unread,
Dec 19, 2012, 8:25:44 AM12/19/12
to django-...@googlegroups.com
#19215: ImageField's “Currently” and “Clear” Sometimes Don't Appear
-----------------------------+-----------------------------------------
Reporter: nrogers64@… | Owner: mcardillo55@…

Type: Bug | Status: new
Component: Forms | Version: 1.4
Severity: Normal | Resolution:

Keywords: ImageField | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 1
-----------------------------+-----------------------------------------
Changes (by mcardillo55@…):

* owner: nobody => mcardillo55@…
* has_patch: 0 => 1
* stage: Accepted => Unreviewed


Comment:

Patch is available at
https://github.com/mcardillo55/django/tree/ticket_19215

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

Django

unread,
Dec 19, 2012, 10:33:03 AM12/19/12
to django-...@googlegroups.com
#19215: ImageField's “Currently” and “Clear” Sometimes Don't Appear
-----------------------------+-----------------------------------------
Reporter: nrogers64@… | Owner: mcardillo55@…
Type: Bug | Status: new
Component: Forms | Version: 1.4
Severity: Normal | Resolution:
Keywords: ImageField | Triage Stage: Accepted

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* stage: Unreviewed => Accepted


Comment:

"Unreviewed" is about the ticket, not the patch. Checking "Has patch" is
enough.

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

Django

unread,
Sep 10, 2013, 7:00:08 PM9/10/13
to django-...@googlegroups.com
#19215: ImageField's “Currently” and “Clear” Sometimes Don't Appear
-----------------------------+-----------------------------------------
Reporter: nrogers64@… | Owner: mcardillo55@…
Type: Bug | Status: new
Component: Forms | Version: 1.4
Severity: Normal | Resolution:
Keywords: ImageField | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* has_patch: 1 => 0


Comment:

Link to patch gives a 404.

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

Django

unread,
Oct 12, 2022, 7:23:17 AM10/12/22
to django-...@googlegroups.com
#19215: ImageField's “Currently” and “Clear” Sometimes Don't Appear
-----------------------------+------------------------------------

Reporter: nrogers64@… | Owner: nobody
Type: Bug | Status: new
Component: Forms | Version: 1.4
Severity: Normal | Resolution:
Keywords: ImageField | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 1
-----------------------------+------------------------------------
Changes (by Mariusz Felisiak):

* cc: Marcelo Galigniana (added)


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

Django

unread,
Oct 14, 2022, 7:11:45 AM10/14/22
to django-...@googlegroups.com
#19215: ImageField's “Currently” and “Clear” Sometimes Don't Appear
-------------------------------------+-------------------------------------
Reporter: nrogers64@… | Owner: Marcelo
| Galigniana
Type: Bug | Status: assigned
Component: Forms | Version: 1.4

Severity: Normal | Resolution:
Keywords: ImageField | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Marcelo Galigniana):

* owner: nobody => Marcelo Galigniana
* status: new => assigned


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

Django

unread,
Oct 17, 2022, 4:03:40 PM10/17/22
to django-...@googlegroups.com
#19215: ImageField's “Currently” and “Clear” Sometimes Don't Appear
-------------------------------------+-------------------------------------
Reporter: nrogers64@… | Owner: Marcelo
| Galigniana
Type: Bug | Status: assigned
Component: Forms | Version: 1.4

Severity: Normal | Resolution:
Keywords: ImageField | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Marcelo Galigniana):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/16187 PR]

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

Django

unread,
Oct 25, 2022, 5:01:25 AM10/25/22
to django-...@googlegroups.com
#19215: ImageField's “Currently” and “Clear” Sometimes Don't Appear
-------------------------------------+-------------------------------------
Reporter: nrogers64@… | Owner: Marcelo
| Galigniana
Type: Bug | Status: assigned
Component: Forms | Version: 1.4
Severity: Normal | Resolution:
Keywords: ImageField | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* stage: Accepted => Ready for checkin


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

Django

unread,
Oct 25, 2022, 10:55:58 AM10/25/22
to django-...@googlegroups.com
#19215: ImageField's “Currently” and “Clear” Sometimes Don't Appear
-------------------------------------+-------------------------------------
Reporter: nrogers64@… | Owner: Marcelo
| Galigniana
Type: Bug | Status: closed
Component: Forms | Version: 1.4
Severity: Normal | Resolution: fixed

Keywords: ImageField | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

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


Comment:

In [changeset:"c0fc1b5302f5d9d82e2255fb5758321fbac34949" c0fc1b53]:
{{{
#!CommitTicketReference repository=""
revision="c0fc1b5302f5d9d82e2255fb5758321fbac34949"
Fixed #19215 -- Fixed rendering ClearableFileInput when editing with
invalid files.

Thanks Michael Cardillo for the initial patch.
}}}

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

Django

unread,
Oct 27, 2022, 2:41:26 AM10/27/22
to django-...@googlegroups.com
#19215: ImageField's “Currently” and “Clear” Sometimes Don't Appear
-------------------------------------+-------------------------------------
Reporter: nrogers64@… | Owner: Marcelo
| Galigniana
Type: Bug | Status: closed
Component: Forms | Version: 1.4

Severity: Normal | Resolution: fixed
Keywords: ImageField | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

Comment (by GitHub <noreply@…>):

In [changeset:"d559cb02da30f74debbb1fc3a46de0df134d2d80" d559cb0]:
{{{
#!CommitTicketReference repository=""
revision="d559cb02da30f74debbb1fc3a46de0df134d2d80"
Refs #19215 -- Fixed admin_widgets tests if Pillow isn't installed.

Follow up to c0fc1b5302f5d9d82e2255fb5758321fbac34949.
}}}

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

Reply all
Reply to author
Forward
0 new messages