#35273: AdminFileWidget renders two elements with the same ID
--------------------------------+--------------------------------------
     Reporter:  Johannes Maron  |                    Owner:  nobody
         Type:  Bug             |                   Status:  new
    Component:  contrib.admin   |                  Version:  5.0
     Severity:  Normal          |               Resolution:
     Keywords:                  |             Triage Stage:  Unreviewed
    Has patch:  0               |      Needs documentation:  0
  Needs tests:  0               |  Patch needs improvement:  0
Easy pickings:  0               |                    UI/UX:  0
--------------------------------+--------------------------------------
Changes (by Johannes Maron):

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

Comment:

 Hi Natalia,

 Thanks, I appreciate you taking the time looking into this and welcoming
 me. Hehe, but I am not really new ;) I happened to contribute, among other
 things, the template-based form rendering and autocomplete fields. Thus, I
 would consider myself somewhat familiar with this part of Django.

 The test you are pointing to is insufficient, since it doesn't include all
 arguments what would be passed to a widget by a form.
 You can see that the output HTML doesn't include an ID for the
 `input[type=file]`. Which it would obviously have in an actual form.

 Funnily enough, the test actually outputs invalid HTML too. A `label.for`
 attribute must point to an existing ID, which it doesn't.

 I am happy to provide a test that will fail. The regression was introduced
 in Django 5 and only applies to the admin file input template.

 Cheers,
 Joe
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35273#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018e13ad17aa-1c1f73b0-e0df-4bf4-b0ed-eec8ef40ea25-000000%40eu-central-1.amazonses.com.

Reply via email to