title: Django Admin MediaOrderConflictWarning
body: <p>Ever since upgrading to Django 2.1, I am receiving a runtime error</p>
  
  <pre><code>/Applications/anaconda3/envs/svod-api-env/lib/python3.6/site-packages/django/forms/widgets.py:126: 
  MediaOrderConflictWarning: Detected duplicate Media files in an opposite order:
  admin/js/collapse.js
  admin/js/inlines.js
  MediaOrderConflictWarning,
  </code></pre>
  
  <p>I think it is because have one collapsed fieldset in my model admin class and my tabular inline classes are to be collapsed as well.</p>
  
  <p>If I remove either the fieldset collapse class or the inline collapse classes, the warning goes away, but it seems they cause a warning when they are both used at the same time.</p>
  
  <p>The <a href="https://media.readthedocs.org/pdf/django-2-docs-zh-cn/master/django-2-docs-zh-cn.pdf" rel="nofollow noreferrer" title="docs">Django 2.1-dev docs</a> say</p>
  
  <blockquote>
    <p>In older versions, forms and formsets combine their Media
    with widget Media by concatenating the two. The combining now tries to preserve the relative order of elements in each list. MediaOrderConflictWarning is issued if the order can’t be preserved.</p>
  </blockquote>
  
  <p>but I can't find a way to fix the media ordering while keeping all the original collapsed classes.  Has anyone else encountered the same problem?</p>
  
  <pre><code>    @admin.register(User)
      class UserModelAdmin(UserAdmin, ExportMixin):
          ...
          fieldsets = (
              (    
                  _('Authentication'), {
                      'classes': (
                          'collapse',
                      ),
                      'fields': (
                          'username',
                          'password',
                          'user_permissions',
                          'groups'
                      )
                  } 
              ),
              (
                  _('Status'), {
                      'fields': (
                          'is_active',
                          'is_staff',
                          'is_superuser'
                      )
                  }
              ),
              ... 
          )
  
          inlines = (
              DeviceTabularInline,
              PaymentTabularInline
          )
  
  
      class DeviceTabularInline(admin.TabularInline):
          model = Device
          classes = ('collapse',)
          ...
  
  
      class PaymentTabularInline(admin.TabularInline):
          model = Payment
          classes = ('collapse',) 
          ...
  </code></pre>