mardi 22 juin 2021

Flask render html files

why flask won't load my HTML file this is my code both python file and HTML file on the same directory

from flask import Flask, request, render_template
app = Flask(__name__)
@app.route('/')
def index():
  return render_template("index.html")
if __name__ == '__main__':
  app.run(debug=True, port=8080)



Aucun commentaire:

Enregistrer un commentaire