Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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)
 
PREVIOUS NEXT
Tagged: #return #html #file #flask
ADD COMMENT
Topic
Name
8+4 =