1

I am unable to connect my javascript file in with my html page in my django app. I have created a separate folder and placed the script.js. Inside html file;

<html>
<body>
    <script src="JS files/script.js"></script>
</body>

</html>
1
  • 2
    you can see here to manage the the static files Commented Jan 27, 2020 at 6:57

1 Answer 1

1

put it in a static folder and call it as

{% load static %}
<script src="{% static 'JS files/script.js' %}"></script>
Sign up to request clarification or add additional context in comments.

2 Comments

yes, inside static folder create JS files folder and put there
It's throwing another error;OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: '<frozen importlib._bootstrap>'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.