Answers for "show data from a python function in a page flask"

0

flask return html

from flask import Flask, render_template

@app.route('/my_page')
def returnHTML():
    return render_template('my_page.html')
Posted by: Guest on January-23-2021
0

how to return an html file in flask

from flask import Flask, render_template

app = Flask(__name__)
@app.route("/")
def index():
    return render_template('index.html') # You have to save the html files
                                         # inside of a 'templates' folder.
    
app.run(debug=True)
Posted by: Guest on September-29-2021

Code answers related to "show data from a python function in a page flask"

Python Answers by Framework

Browse Popular Code Answers by Language