1

I have some data on my django views, and I will pass it to my django templates with some variable. Let's supose that I'm giving to my views a list called 'listone', and on the view I created a list on JS, now I want to pass the listone data to the js list, Is this even possible or there are other way to do it?

Eduardo Fellipe
  • 376
  • 2
  • 14

1 Answers1

0

make a GET ajax call that happens automatically when the page is rendered, it should GET an endpoint you made that returns the list you specified then make an array variable with that list

More info on how to do that from a stackoverflow question

Ahmed I. Elsayed
  • 2,013
  • 2
  • 17
  • 30