I need to load a file into a function to use with a telephone autoformatter library (Intl tel input) When I tried this in a standalone html page, it worked fine, but when I'm trying to do it in a django project, the file just isn't loading and I think it's because it's not finding where it is in the path.
main.js and utils.js are both in the static directory of my project so I'm not sure why it can't find the utils.js file.
main.js:
$(document).ready(function() {
$("#phoneNumber").intlTelInput({
utilsScript: "utils.js"
});
});
{% static 'your_js_here.js' %}upload_pathanduploadify_pathare?context = {'upload_path': upload_path, 'uploadify_path': uploadify_path}andreturn render(request, 'template_name.html', context). If you made html out of your js file, you can extend an html you wanted to inject your js into - see {% extends %}