[3.1.x] Fixed #32371 -- Doc'd jquery.init.js dependency for admin widgets.

Backport of 7b3ec6bcc8 from master
This commit is contained in:
Matthias Kestenholz 2021-01-14 14:02:23 +01:00 committed by Mariusz Felisiak
parent ed616ffe94
commit 2a74248eca
1 changed files with 4 additions and 1 deletions

View File

@ -2172,7 +2172,10 @@ Django admin JavaScript makes use of the `jQuery`_ library.
To avoid conflicts with user-supplied scripts or libraries, Django's jQuery
(version 3.5.1) is namespaced as ``django.jQuery``. If you want to use jQuery
in your own admin JavaScript without including a second copy, you can use the
``django.jQuery`` object on changelist and add/edit views.
``django.jQuery`` object on changelist and add/edit views. Also, your own admin
forms or widgets depending on ``django.jQuery`` must specify
``js=['admin/js/jquery.init.js', …]`` when :ref:`declaring form media assets
<assets-as-a-static-definition>`.
.. versionchanged:: 3.0