Skip to content

Commit 2a74248

Browse files
matthiaskfelixxm
authored andcommitted
[3.1.x] Fixed #32371 -- Doc'd jquery.init.js dependency for admin widgets.
Backport of 7b3ec6b from master
1 parent ed616ff commit 2a74248

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

docs/ref/contrib/admin/index.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2172,7 +2172,10 @@ Django admin JavaScript makes use of the `jQuery`_ library.
21722172
To avoid conflicts with user-supplied scripts or libraries, Django's jQuery
21732173
(version 3.5.1) is namespaced as ``django.jQuery``. If you want to use jQuery
21742174
in your own admin JavaScript without including a second copy, you can use the
2175-
``django.jQuery`` object on changelist and add/edit views.
2175+
``django.jQuery`` object on changelist and add/edit views. Also, your own admin
2176+
forms or widgets depending on ``django.jQuery`` must specify
2177+
``js=['admin/js/jquery.init.js', …]`` when :ref:`declaring form media assets
2178+
<assets-as-a-static-definition>`.
21762179

21772180
.. versionchanged:: 3.0
21782181

0 commit comments

Comments
 (0)