The Django`s docs tell next:
To avoid conflicts with user-supplied scripts or libraries, Django’s jQuery (version 2.1.4) 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.
(see https://docs.djangoproject.com/es/1.9/ref/contrib/admin/…)
But, how using this build-in jQuery. When I am tring to use $ in my custom view I had:
$('body')
Uncaught TypeError: $ is not a function(…)But it is successfully worked in main page of the Django-Admin
$('body')
<body class="dashboard" cz-shortcut-listen="true">…</body>
--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/h4QKC2xHY60/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAG%2B5VyNqyiFpL87i2rHiui4ahQqMes2_pvR1QbSbqTXUHS2k6Q%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAGWd_9%2BsrUg805xAFvu90PGNrYPzm92W6Lax3Rz8Upafwie_pw%40mail.gmail.com.
<script src="{% static 'admin/js/vendor/jquery/jquery.min.js' %} " type="text/javascript" charset="utf-8"></script>
<script src="{% static 'admin/js/jquery.init.js' %} " type="text/javascript" charset="utf-8"></script>
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAG%2B5VyOgDnq%2BEwKYgoZ-tAuoeO_aRdJ3aXtqfJhR6mfzhybVKQ%40mail.gmail.com.