django-autocomplete-light icon indicating copy to clipboard operation
django-autocomplete-light copied to clipboard

Duplicated select2.full.js

Open PaleNeutron opened this issue 4 years ago • 2 comments

I got double select2 span in my admin inline if I use dal in it's parent page.

I found selec2.full.js is loaded twice

They are

http://127.0.0.1:8000/static/vendor/select2/dist/js/select2.full.js http://127.0.0.1:8000/static/admin/js/vendor/select2/select2.full.js

if I block one of them, everything works.

How to resolve the problem?

PaleNeutron avatar Apr 28 '20 01:04 PaleNeutron

I can fix it by update my Django version from 2.1.14 to 2.2.12.

Both selec2.full.js are still loaded in the page, but this time, they works well, no duplicated selects.

So, what's the problem? how can I resolve it if I downgrade back to Django version 2.1.14?

PaleNeutron avatar Apr 28 '20 01:04 PaleNeutron

Honestly I'm not sure anymore, I can't seem to find a recipe that works with all use cases.

As such, anything works for me really, as long as it passes the selenium tests which do test admin inline.

jpic avatar Apr 28 '20 11:04 jpic