I am currently working with a Django project, I include different libraries JS and I create JS files for manage the other libraries, but I don't know the correct organization of JS files for each html page, for example, I have a "Main.js" and "Milk.js" in base template but I don't want have both files in the same base template, I want separate files for each page..
I tried adding as a normal js file
<script src="{{ STATIC_URL }}js/milk.js"></script>
But it show me a error message asking me several dependencies when inherited from base.html
I hope your help
EDITED:
Cuando he a?adido en mis archivos de plantillas, sin mostrarme error en la consola de cromo pero en la consola django mostrarme los archivos JS de carga con 304 error.
The libraries are in base.html
it's strange, I can load milk.js when I click from home.html but when I will click in other page for example "cow.html" from "Milk.html" no load js file even when I did the same as "milk.html".
See Question&Answers more detail:os