Answer the question
In order to leave comments, you need to log in
How to include JavaScript in Django?
Friends, hello everyone!
I'm doing the first project on Django (2.2.8), I can't connect JS to the index.html of the application.
{% load static %} - declared.
STATIC_URL = '/static/' - set
I declare:
<script type="text/javascript" scr={% static "js/jquery.min.js" %}></script>
<script type="text/javascript" scr={% static "js/main.js" %}></script>
Answer the question
In order to leave comments, you need to log in
<script type="text/javascript" src={% static "js/jquery.min.js" %}></script>
<script type="text/javascript" src={% static "js/main.js" %}></script>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question