django-jet

Fix Django-Jet Select Dropdown not Working on Custom Page

I’m having an issue when creating a custom page in django-jet. I’m using v1.0.6 and always got jQuery error in dropdown select in my custom page.

Uncaught TypeError: django.jQuery is not a function
at HTMLSelectElement.<anonymous> (bundle.min.js?v=1.0.8:1)
at HTMLSelectElement.dispatch (bundle.min.js?v=1.0.8:9)
at HTMLSelectElement.m.handle (bundle.min.js?v=1.0.8:9)
at Object.trigger (bundle.min.js?v=1.0.8:9)
at HTMLSelectElement.<anonymous> (bundle.min.js?v=1.0.8:9)
at Function.each (bundle.min.js?v=1.0.8:8)
at ot.fn.init.each (bundle.min.js?v=1.0.8:7)
at ot.fn.init.trigger (bundle.min.js?v=1.0.8:9)
at n.select (bundle.min.js?v=1.0.8:12)
at o.<anonymous> (bundle.min.js?v=1.0.8:12)

I solved my issue by adding jquery manually following below in my custom page.

{% block extrahead %}
{{ block.super }}


{% endblock %}

Hope this issue fixed in next release.

Reference: https://github.com/geex-arts/django-jet/issues/161#issuecomment-412071688

Advertisements