You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am sorry to ask help from you , that is I want to use django-autocomplete-light for the foreign key in the form. But it returns me the error as follows: select2.js:25 Uncaught TypeError: $(...).select2 is not a function(anonymous function) @ select2.js:25jQuery.event.dispatch @ jquery.js:4435elemData.handle @ jquery.js:4121jQuery.event.trigger @ jquery.js:4350(anonymous function) @ jquery.js:4901jQuery.extend.each @ jquery.js:374jQuery.fn.jQuery.each @ jquery.js:139jQuery.fn.extend.trigger @ jquery.js:4900initialize @ autocomplete.init.js:45jQuery.extend.each @ jquery.js:374jQuery.fn.jQuery.each @ jquery.js:139(anonymous function) @ autocomplete.init.js:50fire @ jquery.js:3099self.fireWith @ jquery.js:3211jQuery.extend.ready @ jquery.js:3417completed @ jquery.js:3433
I rearranged the INSTALLED_APPS in the settings.py as follows: INSTALLED_APPS = [ 'admin_bootstrapped_plus', 'django_admin_bootstrapped', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'dal', 'dal_select2', "webui", "membership", "hotel", "transaction", 'django.contrib.admin', "gunicorn", ]
But the error is also there.
the error raises if your js files where you have bounded the select2 with select box is loading before select2 js files. Please make sure files should be in this order like:Jquery, select2 js, your js.
But I do not know how to reorder them.
The text was updated successfully, but these errors were encountered:
I am sorry to ask help from you , that is I want to use django-autocomplete-light for the foreign key in the form. But it returns me the error as follows:
select2.js:25 Uncaught TypeError: $(...).select2 is not a function(anonymous function) @ select2.js:25jQuery.event.dispatch @ jquery.js:4435elemData.handle @ jquery.js:4121jQuery.event.trigger @ jquery.js:4350(anonymous function) @ jquery.js:4901jQuery.extend.each @ jquery.js:374jQuery.fn.jQuery.each @ jquery.js:139jQuery.fn.extend.trigger @ jquery.js:4900initialize @ autocomplete.init.js:45jQuery.extend.each @ jquery.js:374jQuery.fn.jQuery.each @ jquery.js:139(anonymous function) @ autocomplete.init.js:50fire @ jquery.js:3099self.fireWith @ jquery.js:3211jQuery.extend.ready @ jquery.js:3417completed @ jquery.js:3433
With the help of this
I rearranged the INSTALLED_APPS in the settings.py as follows:
INSTALLED_APPS = [ 'admin_bootstrapped_plus', 'django_admin_bootstrapped', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'dal', 'dal_select2', "webui", "membership", "hotel", "transaction", 'django.contrib.admin', "gunicorn", ]
But the error is also there.
According to this link:
the error raises if your js files where you have bounded the select2 with select box is loading before select2 js files. Please make sure files should be in this order like:Jquery, select2 js, your js.
But I do not know how to reorder them.
The text was updated successfully, but these errors were encountered: