Django templates crashes with no sense
Posted
by user233323
on Stack Overflow
See other posts from Stack Overflow
or by user233323
Published on 2010-03-26T01:28:34Z
Indexed on
2010/03/26
1:33 UTC
Read the original article
Hit count: 830
python
|django-templates
Hello I'm trying to use google visualization API along with django templates system. I got an error that don't know how to fix. The error is the following:
invalid_block_tag raise self.error(token, "Invalid block tag: '%s'" % command) django.template.TemplateSyntaxError: Invalid block tag: 'endfor'
The code is:
function drawChart() { var data = new google.visualization.DataTable(); data.addColumn('date', 'time'); data.addColumn('number', 'x'); data.addColumn('number', 'y'); data.addColumn('number', 'z'); data.addRows([ {% for d in datos &} [new Date({{d.instante|date:"Y, m, d, H, i, s"}}), {{d.x}}, {{d.y}}, {{d.z}}] {% if not forloop.last %},{% endif %} ]); {% endfor %} var chart = new google.visualization.AnnotatedTimeLine(document.getElementById('chart_div')); chart.draw(data, {displayAnnotations: true}); }
Thanks you all!
© Stack Overflow or respective owner