python/flask/Jinja2 and Json

前端 未结 1 1284
攒了一身酷
攒了一身酷 2021-02-06 02:28

\"I am using Flask,Jinja2,higHighcharts\"

Example (Python/Flask):

@app.route(\"/column/\")
def column():
    data=[{\"data\": [49.9, 54.4], \"name\": \"T         


        
1条回答
  •  忘了有多久
    2021-02-06 02:54

    Mark your data as safe with Markup:

    Marks a string as being safe for inclusion in HTML/XML output without needing to be escaped.

    Or change {{ data }} to {{ data|tojson|safe }}.

    0 讨论(0)
提交回复
热议问题