Skip to content

"Uncaught TypeError: $element.select2 is not a function" after upgrading Django from 2.0.13 to 3.2.17 #210

Answered by codingjoe
marshl asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @marshl,

Thanks for reaching out. As it happens, I might have an idea where what's causing this error. Mainly because I implemented the change causing the issue in Django myself ;)

Django 3.2 has native Select2 input support. I'd recommend switching to either Django's autocomplete_fields or for more advanced use cases to our Select2AdminMixin. Those will handle asset management properly for you.

If run into any more problems, please let me know. Upgrading for such an old Django version is never a fun task. Might I recommend Adam's django-upgrade, to help you with some of that work?

Cheers!
Joe

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@marshl
Comment options

Answer selected by marshl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants
Converted from issue

This discussion was converted from issue #209 on April 20, 2023 06:51.