JQuery - use static file in getscript

In one of my script, I'm using

$.getScript("https://rawgit.com/indrimuska/jquery-editable-select/master/dist/jquery-editable-select.min.js").then(() => {...});

to get a script before going on.

Loading this script via https is very time consuming so I saved this file to my static folder in django as jquery-editable-select.min.js

how can I use my static js file instead of the https:// url inside $.getScript ?

I tried

$.getScript("{% static 'my/path/from/static/folder/jquery-editable-select.min.js'%}").then(() => {...});

but it's not working

Вернуться на верх