I am trying to create a graph in chart.js from data that i have extracted from an SQL database using python. I am creating a JSON file in python which I then load in javascript (I don’t know if this is the best way to do this).
Here is my code
{% extends "layout.html" %}
{% block head %}
<script src="https://cdn.jsdelivr.net/npm/chart.js@2.9.4/dist/Chart.min.js"></script>
{% block title %}
Graph
{% endblock %}
{% block main %}
<canvas id="chart" width="300" height="300"></canvas>
<script>
const labels = [];
const ycoordinate = [];
chartIt();
async function chartIt(){
await getData();
const ctx = document.getElementById('chart').getContext('2d');
const myChart = new Chart(ctx, {
type: 'line',
data: {
labels: labels,
datasets:[{
data: ycoordinate
}],
},
options: {}});
}
async function getData(){
const response = await fetch('data.json');
const data = await response.text();
console.log(data);
const labels = data.map((x) => x.date);
const ycoordinate = data.map((x) => x.mass);
}
</script>
{% endblock %}
When I run this I get a 500 internal server error line 68, in template {% endblock %}
jinja2.exceptions.TemplateSyntaxError: Unexpected end of template. Jinja was looking for the following tags: ‘endblock’. The innermost block that needs to be closed is ‘block’.
and in my console I get Mixed content: load all resources via HTTPS to improve the security of your site
modafinil and alcohol – site modafinil for sale
http://withoutbro.com buying viagra
http://wardenafil.com levitra or viagra
amoxicillin without a doctorвЂs prescription – amoxil 500 amoxil 500 mg generic name
https://himscanada.com/ cialis for bph
https://himscanada.com/ tadalafil 20mg best price
buy bayer vardenafil online – vardenafil cheap generic vardenafil 40 mg
http://fildenahim.com crystal medicine fildena review
ivermectin generic cream – ivermectin 50 generic ivermectin online
http://levitradd.com/ how long for levitra to work
canada pharmacy coupon – cialis online pharmacy us price of tadalafil 20mg
ivermectin uk – stromectol tab buy ivermectin stromectol
buy accutane online canada – accutane roche buy generic accutane
http://stromectolhumans.com ivermectin 12 mg tablets for sale
http://himshairloss.com/ alopecia
amoxicilin without prescription – amoxicillin price without insurance buy amoxicilina 500 mg online
http://ivermectinsl.com stromectol
buy cialis canada – tadalafil 20 mg soft chewable tablets canadian cialis order
prednisone otc price – prednisone 10mg pills 5 prednisone in mexico
https://viagraxyu.com can i buy viagra online
http://iwermectin.com/ ivermectin for sale uk
modafinil reddit – provigil for adhd provigil for adhd
z pak – zithromax otc side effects of azithromycin
average cost of lasix – furosemide 40 mg price furosemide cream
http://ivermectineffects.com/ ivermectin tablets dosage
http://ivermectinovercounter.com/ stromectol
https://ivermectineffects.com stromectol
soft chewable cialis – cialis overnight shipping cialis online 5mg
cobra health insurance eligibility find my local doctors
ivermectin where to find https://ivermectinhome.com
ivermectin 2mg online – buy oral ivermectin stromectol 6mg
https://ivermectinus.com/ side effects for ivermectin
casino online usa – site slots real money
https://zithrozpack.com/ zithromax
levitra super active https://levitrair.com cialis vs levitra vs viagra which one is better
how to cure erectile dysfunction naturally and permanently – cure for ed erectile dysfunction treatment
price for 15 prednisone – prednisone otc uk buy prednisone online no script
ivermectin dosage chart for humans https://stromectolus.com ivermectin for humans where to buy
viagra over the counter australia – viagra comparison prices viagra 100mg india price
http://albuterolotc.com/ ventolin tablet price comparison
cialis order online – Cialis woman tadalafil canada price
ivermectin 1mg – price of stromectol tablets ivermectin without prescription
ivermectin for humans for sale https://ivermcov.com/# stromectol
top ed pills – ed problems erectile dysfunction pills
javascript-help.li with get prescriptions online legally https://pharmvolk.com buy medication without an rx
health care insurers http://ventolinhfaer.com/ albuterol inhaler
javascript-help.li with walmart ivermectin for humans http://ivermectini.com ivermectin for humans for sale cvs
rachael ray mens health mag pic http://ivermectinus.com side effects for ivermectin
when to start zidovudine on baby born to hiv mom ivermectin without doctor prescription https://iveramectin.com ivermectin for humans
sildenafil 50mg tablets uk – female viagra pills buy in india
congress not paying what public pays for healthcare http://canadianvolk.com most reliable canadian online pharmacies
how to buy tadalafil online – over the counter cialis canada cialis brand coupon
sale vardenafil – viagra cialis vardenafil order online vardenafil lastgeneric vardenafil
buy viagra without prescription https://viagrob.com otc viagra
javascript-help.li with reputable overseas online pharmacies http://ivermectinhum.com ivermectine coronavirus
amoxicillin – amoxicillin over counter buy amoxicillina 500 mg from mexico
methylprednisolone medication generic – methylprednisolone tablet 8 mg buy lyrica 300mg
ivermectin gel – stromectol medicine ivermectin uk
canada pharmacy prednisone – prednisone 4 tablets daily cost of 10 mg prednisone
ventolin over the counter – ventolin generic buy ventolin
https://stromectolo.com – ivermectin tablets
stromectol south africa – ivermectin human cost stromectol
buy ivermectin pills http://ivermectin1.com/ ivermectin germany
azithromycin https://azithrozpack.com azithromycin prescription cost
low price viagra – buy discount viagra online tadalafil price in south africa
cetirizine 5mg tab – https://allergyd.com
https://ivrmectin.com – ivermectin over the counter
1 in 6 who enter the hospital have no health insurance http://kamagraday.com – kamagra 100mg oral jelly review
buy generic vardenafil uk – buytopep ed pills walmart
cenforce 100 usa and uk – vidalista 60mg vilitra 20mg
insanlar iГ§in ivermektin http://stromectolforte.com/ ivermectin ivermectin tablets dosage
xenical 60 – xenical mg orlistat medication reviews
iwermektyna kup online https://stromectolforte.com/# ivermectin for humans over the counter skin oral ivermectin cost
tadalafil best price india – cialis tablets cialis for sale
ivermectin cream 1% https://www.ivermecton.com/ ivermectin human dosage
buy viagra online with prescription – sildenafil without a doctor’s prescription genuine viagra tablets
generic cialis online best price – site buy cialis from canadian pharmacy
buy ivermectin 3mg online – generic name for ivermectin ivermectin lice oral
sugarhouse casino online – online casino real money usa doubleu casino
https://www.sildenafilhim.com matt lauer erectile dysfunction
sildenafil 20 mg pills http://www.viagwdp.com/ genuine viagra uk what happens if a girl takes viagra
canadian pharmacy no prescription needed – canadian online pharmacy no prescription canada drugs laws
women viagra http://viagwdp.com/# buy viagra on line real viagra for sale
order accutane online usa – accutane medication accutane for sale online uk
amoxil image buy amoxil 500mg canada amoxicillin for herpes what is the dosage of amoxil
order cenforce 50mg – order zovirax 800mg sale cheap acyclovir 800mg
buy tadalafil 5mg online – buy provigil generic ivermectin 12mg for sale