how to pass data to html page using flask?
You should pass the data
to the homepage:
@app.route("/")
def home():
return render_template('home.html', data=data)
Given that you're using Flask, I'll assume you use jinja2 templates. You can then do the following in your flask app:
return render_template('home.html', data=data)
And parse data
in your HTML template:
<ul>
{% for item in data %}
<li>{{item.name}}</li>
<li>{{item.place}}</li>
<li>{{item.mob}}</li>
{% endfor %}
</ul>