#28866: merge method of class Media doesn't work properly
---------------------------------+--------------------------------------
Reporter: clincher | Owner: nobody
Type: Bug | Status: new
Component: Forms | Version: 2.0
Severity: Release blocker | Resolution:
Keywords: forms, media | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------
Comment (by Tim Graham):
Have you read [https://docs.djangoproject.com/en/dev/topics/forms/media
/#form-media-asset-order the documentation about how merging is supposed
to work]?
If you want jQuery included before the Google Maps stuff, then you need to
reorder `list_2` so that jQuery is before it. Something like
`['admin/js/vendor/jquery/jquery.js', 'admin/js/jquery.init.js',
'admin/js/inlines.js',
'https://maps.googleapis.com/maps/api/js?libraries=places&key=',
'mapwidgets/js/jquery_class.js', 'mapwidgets/js/django_mw_base.js',
'mapwidgets/js/mw_google_point_field.js']`.
Is there a reason you can't do that?
In older versions of Django, the resulting Media only happened to work
because jQuery was used in `list_1`. I think the new ordering logic that
tries to preserve relative ordering in the two media lists is more
intuitive.
--
Ticket URL: <https://code.djangoproject.com/ticket/28866#comment:4>
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/066.92e8b21cb534bfda9f2f5c63acbd36f2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.