summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2013-01-13 15:11:24 -0500
committerTim Graham <timograham@gmail.com>2013-01-13 15:12:50 -0500
commit64f1a175bd8228493ef600a62cd2f331a17787e6 (patch)
treeedb0b1ca00a38ccd80f10e147ca199c4abcfa67d /docs/ref
parentd828c5c3a0c0aa736ca7b35fe0cb566ba14f04e4 (diff)
[1.5.X] Added details on minified jQuery and DEBUG mode for contrib.admin.
Thanks Daniele Procida. Backport of 4720117a31 from master
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/contrib/admin/index.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt
index dba438d111..c89eabbf55 100644
--- a/docs/ref/contrib/admin/index.txt
+++ b/docs/ref/contrib/admin/index.txt
@@ -1412,6 +1412,9 @@ The :doc:`staticfiles app </ref/contrib/staticfiles>` prepends
``None``) to any media paths. The same rules apply as :ref:`regular media
definitions on forms <form-media-paths>`.
+jQuery
+~~~~~~
+
Django admin Javascript makes use of the `jQuery`_ library. To avoid
conflicts with user-supplied scripts or libraries, Django's jQuery is
namespaced as ``django.jQuery``. If you want to use jQuery in your own admin
@@ -1422,6 +1425,15 @@ If you require the jQuery library to be in the global namespace, for example
when using third-party jQuery plugins, or need a newer version of jQuery, you
will have to include your own copy of jQuery.
+Django provides both uncompressed and 'minified' versions of jQuery, as
+``jquery.js`` and ``jquery.min.js`` respectively.
+
+:class:`ModelAdmin` and :class:`InlineModelAdmin` have a ``media`` property
+that returns a list of ``Media`` objects which store paths to the JavaScript
+files for the forms and/or formsets. If :setting:`DEBUG` is ``True`` it will
+return the uncompressed versions of the various JavaScript files, including
+``jquery.js``; if not, it will return the 'minified' versions.
+
.. _jQuery: http://jquery.com
Adding custom validation to the admin