#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: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Comment (by Matt Westcott):
As a tentative fix, I propose that media objects should explicitly
distinguish between cases where we do / don't care about ordering,
notionally something like:
{{{
class FancyTextWidget(forms.Widget):
class Media:
js = {
('text-editor.js', 'text-editor-extras.js'), # tuple = order
is important
'color-picker.js' # set = order is unimportant
}
}}}
(although using a set for this is problematic due to the need for contents
to be hashable), and the result of adding two media objects should be a
"don't care" so that we aren't introducing dependencies where the original
objects didn't have them. We would then defer assembling them into a flat
list until the final render call. I haven't worked out the rest of the
algorithm yet, but I'm willing to dig further if this sounds like a
sensible plan of attack...
--
Ticket URL: <https://code.djangoproject.com/ticket/30179#comment:1>
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.f17120bcfc21dd813994f1bd02c28ee3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.