  from django.utils.html import escape, conditional_escape
  from django.utils.safestring import mark_safe
  from django.utils.translation import ugettext_lazy as _
  
  
  ACTION_CHECKBOX_NAME = '_selected_action'
  
 
</s> remove from django import forms
 </s> add  </s> remove         extra = "" if settings.DEBUG else ".min"
 </s> add         extra = '' if settings.DEBUG else '.min' </s> remove             js = ['jquery.min.js', 'jquery.init.js', 'collapse.min.js']
 </s> add             extra = '' if settings.DEBUG else '.min'
            js = ['jquery%s.js' % extra,
                  'jquery.init.js',
                  'collapse%s.js' % extra] </s> remove         extra = "" if settings.DEBUG else ".min"
        js = ['jquery%s.js' % extra, 'jquery.init.js', "inlines%s.js" % extra]
 </s> add         extra = '' if settings.DEBUG else '.min'
        js = ['jquery%s.js' % extra, 'jquery.init.js', 'inlines%s.js' % extra] </s> remove     def test_media_minified_only_if_debug_is_false(self):
        """
        Ensure that, with ModelAdmin, the minified versions of the JS files are
        only used when DEBUG is False.
        Refs #17521.
        """
        ma = ModelAdmin(Band, self.site)
        ma.prepopulated_fields = ['something']
        ma.actions = ['some action']

        with override_settings(DEBUG=False):
            media_js = str(ma.media['js'])
            self.assertFalse('jquery.js' in media_js)
            self.assertTrue('jquery.min.js' in media_js)
            self.assertFalse('prepopulate.js' in media_js)
            self.assertTrue('prepopulate.min.js' in media_js)
            self.assertFalse('actions.js' in media_js)
            self.assertTrue('actions.min.js' in media_js)
        with override_settings(DEBUG=True):
            media_js = str(ma.media['js'])
            self.assertTrue('jquery.js' in media_js)
            self.assertFalse('jquery.min.js' in media_js)
            self.assertTrue('prepopulate.js' in media_js)
            self.assertFalse('prepopulate.min.js' in media_js)
            self.assertTrue('actions.js' in media_js)
            self.assertFalse('actions.min.js' in media_js)

    def test_inlines_media_minified_only_if_debug_is_false(self):
        """
        Ensure that, with InlineModelAdmin, the minified versions of the JS
        files are only used when DEBUG is False.
        Refs #17521.
        """
        class InlineBandAdmin(InlineModelAdmin):
            model = Band

        ma = InlineBandAdmin(Band, self.site)
        ma.prepopulated_fields = ['something']
        ma.actions = ['some action']

        with override_settings(DEBUG=False):
            media_js = str(ma.media['js'])
            self.assertFalse('jquery.js' in media_js)
            self.assertTrue('jquery.min.js' in media_js)
            self.assertFalse('prepopulate.js' in media_js)
            self.assertTrue('prepopulate.min.js' in media_js)
            self.assertFalse('inlines.js' in media_js)
            self.assertTrue('inlines.min.js' in media_js)
        with override_settings(DEBUG=True):
            media_js = str(ma.media['js'])
            self.assertTrue('jquery.js' in media_js)
            self.assertFalse('jquery.min.js' in media_js)
            self.assertTrue('prepopulate.js' in media_js)
            self.assertFalse('prepopulate.min.js' in media_js)
            self.assertTrue('inlines.js' in media_js)
            self.assertFalse('inlines.min.js' in media_js)

 </s> add 
from django.conf import settings
  from django.utils.html import escape, conditional_escape
  from django.utils.safestring import mark_safe
  from django.utils.translation import ugettext_lazy as _
from django.conf import settings
  
  
  ACTION_CHECKBOX_NAME = '_selected_action'
  
keep keep add keep keep keep keep
 Improved on r17454 to ensure that `collapse.js` only gets minified when `DEBUG` is `False`.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17455 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
django/contrib/admin/helpers.py