diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py
a
|
b
|
|
271 | 271 | def _media(self): |
272 | 272 | from django.conf import settings |
273 | 273 | |
274 | | js = ['js/core.js', 'js/admin/RelatedObjectLookups.js'] |
| 274 | js = ['js/core.js', 'js/admin/RelatedObjectLookups.js', |
| 275 | 'js/jquery.min.js', 'js/jquery.init.js'] |
275 | 276 | if self.actions is not None: |
276 | | js.extend(['js/jquery.min.js', 'js/jquery.init.js', 'js/actions.min.js']) |
| 277 | js.extend(['js/actions.min.js']) |
277 | 278 | if self.prepopulated_fields: |
278 | 279 | js.append('js/urlify.js') |
279 | 280 | js.append('js/prepopulate.min.js') |
diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt
a
|
b
|
|
938 | 938 | Keep in mind that this will be prepended with ``MEDIA_URL``. The same rules |
939 | 939 | apply as :ref:`regular media definitions on forms <topics-forms-media>`. |
940 | 940 | |
| 941 | Django admin Javascript makes use of the `jQuery`_ library. To avoid |
| 942 | conflict with user scripts, Django's jQuery is namespaced as |
| 943 | ``django.jQuery``. If you want to use jQuery in your own admin |
| 944 | JavaScript without including a second copy, you can use the |
| 945 | ``django.jQuery`` object on changelist and add/edit views. |
| 946 | |
| 947 | .. _jQuery: http://jquery.com |
| 948 | |
941 | 949 | Adding custom validation to the admin |
942 | 950 | ------------------------------------- |
943 | 951 | |
diff --git a/tests/regressiontests/admin_views/tests.py b/tests/regressiontests/admin_views/tests.py
a
|
b
|
|
1386 | 1386 | self.assert_('action-checkbox-column' not in response.content, |
1387 | 1387 | "Found unexpected action-checkbox-column class in response") |
1388 | 1388 | |
| 1389 | def test_model_without_action_still_has_jquery(self): |
| 1390 | "Tests that a ModelAdmin without any actions still gets jQuery included in page" |
| 1391 | response = self.client.get('/test_admin/admin/admin_views/oldsubscriber/') |
| 1392 | self.assertEquals(response.context["action_form"], None) |
| 1393 | self.assert_('jquery.min.js' in response.content, |
| 1394 | "jQuery missing from admin pages for model with no admin actions" |
| 1395 | ) |
| 1396 | |
1389 | 1397 | def test_action_column_class(self): |
1390 | 1398 | "Tests that the checkbox column class is present in the response" |
1391 | 1399 | response = self.client.get('/test_admin/admin/admin_views/subscriber/') |