In Django how display all of the values aftere the for loop is finished instead of displaying them one by one
- by Igor
Hello,
In my django project in the view I call the last 6 values in the column and send them to the template. I then would like to pass into google charts api those 6 values and have a graph. At the moment for some reason I get 6 different graphs.
{% for foodbag in foodbags %}
<img src="http://chart.apis.google.com/chart?chxl=0:|0|1|2|3|4|5|6&chxr=2,0,0&chxs=0,1,676767,10.5,1,l,676767|2,676767,5.5,0,l,676767&chxt=x,y&chs=300x170&cht=bvg&chco=76A4FB&chd=t:{{foodbag.12}},0&chma=0,5|5,5&chdlp=t&chtt=Food+Bags"/>
{% endfor %}
I'm not sure how to replace string chd=t:{{foodbag.12}}, with the 6 values I am trying to extract from foodbags. I would really appreciate the help.
Thank you