diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py
index 3a0ad74..ee4ff97 100644
--- a/django/contrib/admin/options.py
+++ b/django/contrib/admin/options.py
@@ -1,5 +1,6 @@
 from functools import update_wrapper, partial
 from django import forms
+from django.conf import settings
 from django.forms.formsets import all_valid
 from django.forms.models import (modelform_factory, modelformset_factory,
     inlineformset_factory, BaseInlineFormSet)
@@ -394,16 +395,17 @@ class ModelAdmin(BaseModelAdmin):
 
     @property
     def media(self):
+        extra = "" if settings.DEBUG else ".min"
         js = [
             'core.js',
             'admin/RelatedObjectLookups.js',
-            'jquery.min.js',
+            'jquery%s.js' % extra,
             'jquery.init.js'
         ]
         if self.actions is not None:
-            js.append('actions.min.js')
+            js.append('actions%s.js' % extra)
         if self.prepopulated_fields:
-            js.extend(['urlify.js', 'prepopulate.min.js'])
+            js.extend(['urlify.js', 'prepopulate%s.js' % extra])
         if self.opts.get_ordered_objects():
             js.extend(['getElementsBySelector.js', 'dom-drag.js' , 'admin/ordering.js'])
         return forms.Media(js=[static('admin/js/%s' % url) for url in js])
@@ -1371,9 +1373,10 @@ class InlineModelAdmin(BaseModelAdmin):
 
     @property
     def media(self):
-        js = ['jquery.min.js', 'jquery.init.js', 'inlines.min.js']
+        extra = "" if settings.DEBUG else ".min"
+        js = ['jquery%s.js' % extra, 'jquery.init.js', "inlines%s.js" % extra]
         if self.prepopulated_fields:
-            js.extend(['urlify.js', 'prepopulate.min.js'])
+            js.extend(['urlify.js', 'prepopulate%s.js' % extra])
         if self.filter_vertical or self.filter_horizontal:
             js.extend(['SelectBox.js', 'SelectFilter2.js'])
         return forms.Media(js=[static('admin/js/%s' % url) for url in js])
diff --git a/tests/regressiontests/modeladmin/tests.py b/tests/regressiontests/modeladmin/tests.py
index 799d4f5..6c7394c 100644
--- a/tests/regressiontests/modeladmin/tests.py
+++ b/tests/regressiontests/modeladmin/tests.py
@@ -5,7 +5,7 @@ from datetime import date
 from django import forms
 from django.conf import settings
 from django.contrib.admin.options import (ModelAdmin, TabularInline,
-    HORIZONTAL, VERTICAL)
+     InlineModelAdmin, HORIZONTAL, VERTICAL)
 from django.contrib.admin.sites import AdminSite
 from django.contrib.admin.validation import validate
 from django.contrib.admin.widgets import AdminDateWidget, AdminRadioSelect
@@ -15,6 +15,7 @@ from django.core.exceptions import ImproperlyConfigured
 from django.forms.models import BaseModelFormSet
 from django.forms.widgets import Select
 from django.test import TestCase
+from django.test.utils import override_settings
 from django.utils import unittest
 
 from .models import Band, Concert, ValidationTestModel, ValidationTestInlineModel
@@ -493,6 +494,52 @@ class ModelAdminTests(TestCase):
             list(ma.get_formsets(request))[0]().forms[0].fields.keys(),
             ['extra', 'transport', 'id', 'DELETE', 'main_band'])
 
+    def test_media(self):
+        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.assertTrue('jquery.min.js' in media_js)
+            self.assertTrue('prepopulate.min.js' in media_js)
+            self.assertTrue('actions.min.js' in media_js)
+        with override_settings(DEBUG=True):
+            media_js = str(ma.media['js'])
+            self.assertFalse('jquery.min.js' in media_js)
+            self.assertTrue('jquery.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)
+
+
+class InlineModelAdminTest(TestCase):
+    def setUp(self):
+        self.site = AdminSite()
+
+    def test_media(self):
+        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.assertTrue('jquery.min.js' in media_js)
+            self.assertTrue('prepopulate.min.js' in media_js)
+            self.assertTrue('inlines.min.js' in media_js)
+        with override_settings(DEBUG=True):
+            media_js = str(ma.media['js'])
+            self.assertFalse('jquery.min.js' in media_js)
+            self.assertTrue('jquery.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)
+
 
 class ValidationTests(unittest.TestCase):
     def test_validation_only_runs_in_debug(self):
