#30179: Merging 3 or more media objects can throw unnecessary
MediaOrderConflictWarnings
-------------------------------+------------------------------------
Reporter: Matt Westcott | Owner: nobody
Type: Bug | Status: new
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Comment (by Matthias Kestenholz):
This sounds correct. I'm not sure it's right though. It does sound awfully
complex for what there is to gain. Maintaining this down the road will not
get easier. Finding, explaining and understanding the fix for #30153 did
already cost a lot of time which could also have been invested elsewhere.
If I manually assign widget3's JS lists (see
https://code.djangoproject.com/ticket/30179#comment:5) then everything
just works and the final result is correct:
{{{
# widget3 = Media(js=['text-editor.js', 'text-editor-extras.js', 'color-
picker.js'])
widget3 = Media()
widget3._js_lists = [['text-editor.js', 'text-editor-extras.js'], ['color-
picker.js']]
}}}
So what you proposed first
(https://code.djangoproject.com/ticket/30179#comment:1) might just work
fine and would be good enough (tm).
Something like
https://github.com/django/django/blob/543fc97407a932613d283c1e0bb47616cf8782e3/django/forms/widgets.py#L52
{{{
# Instead of self._js_lists = [js]:
self._js_lists = list(js) if isinstance(js, set) else [js]
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/30179#comment:12>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.65183a36147fca109447e94b39fa7ff1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.