1
jQuery is included already in Django admin, it’s just under the django
namespace. Passing in django.jQuery
using an immediately invoking function allows you to use the more familiar $
shortcut instead of having to write django.jQuery
all the time.
(function($) {
$(function() {
alert('Hi');
});
})(django.jQuery);
Source:stackexchange.com