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?
Asked
Active
Viewed 35 times
1
-
Hi, welcome to SO, please post some code of what you have tried so far, do read through (https://stackoverflow.com/help/how-to-ask) – Sammy J Oct 31 '19 at 15:56
-
I found a good and simple answer on this StackOverflow Question – Eduardo Fellipe Nov 01 '19 at 15:27
1 Answers
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