I am building a Django movie app which makes use of the TMDB API. The way I have it set up currently is that I have a function in my main.js which is run when the page is loaded