Duc & Kevin:
Thank you for your quick and accurate replies.
It looks like I need to spend more time with the documentation.
Kevin's solution fixed my problem.
-CJL
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
It would probably be easier if you processed crime_list in your view and
generated a 'crimes' variable for use in your template.
cjl wrote:
> DU:
>
> I am a newbie, and I'm working on a simple tutorial for other
> newbies. I am trying to generate some javascript, and I have the
> following code
There's a forloop.last variable that you could test. Eg:
var crimes = [
{% for crime in crime_list %}
[ {{crime.longitude}},
{{ crime.latitude }},'{{ crime.address }}','{{ crime.type }}','{{ crime.date
}}']
{% if not forloop.last %},{% endif %}
{% endfor %}
];
On Jul 19, 12:35 pm, cjl <[EMA
DU:
I am a newbie, and I'm working on a simple tutorial for other
newbies. I am trying to generate some javascript, and I have the
following code in my template:
var crimes = [
{% for crime in crime_list %}
[ {{crime.longitude}},
{{ crime.latitude }},'{{ crime.address }}','{{ crime.type }}',
4 matches
Mail list logo