I am learning to render HTML file in flask
my code
app.py:-
from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def home():
return render_template('index.html')
if __name__ == '__main__':
app.run()
index.html:-
<html>
<head>
<title>Flask render</title>
</head>
<body>
<h1>This is the Index page</h1>
</body>
</html>
expected output:-
What i am getting:-
Aucun commentaire:
Enregistrer un commentaire