#28866: merge method of class Media doesn't work properly
-------------------------------------------+------------------------------
               Reporter:  clincher         |          Owner:  nobody
                   Type:  Uncategorized    |         Status:  new
              Component:  Forms            |        Version:  2.0
               Severity:  Release blocker  |       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                |
-------------------------------------------+------------------------------
 I was trying to use django-map-widgets with django2.0rc1 and it didn't
 show the widget. The problem is that widget js-files were included before
 django-admin jquery's files which it relies on.
 I went deeper and found that Media.merge method are pretty much implicit
 which breaks Python zen guidelines. The implicity caused by
 MediaOrderConflictWarning check, without that check code might be way more
 simplier. More than that, the realization of that check is not working. I
 got few ideas how to solve it, but honestly I would prefer just remove it
 and make the method really simple.

 Example of lists with which the method doesn't work properly:
 list_1 = ['admin/js/vendor/jquery/jquery.js', 'admin/js/jquery.init.js',
 'admin/js/core.js', 'admin/js/admin/RelatedObjectLookups.js',
 'admin/js/actions.js', 'admin/js/urlify.js', 'admin/js/prepopulate.js',
 'admin/js/vendor/xregexp/xregexp.js']
 list_2 = ['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',
 'admin/js/vendor/jquery/jquery.js', 'admin/js/jquery.init.js',
 'admin/js/inlines.js']

 I can easily make a patch without the warning check. Also can check the
 order, but it's gonna be very different way from what's there now.

 I set serverity to blocker since it's totally breaks possibility to use
 Django with many other libraries

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28866>
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.34ee0450ab354b03645bedec90c5557c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to