I'm learning Flask for the first time and I can't get the local host to display the second page. I put 2 pages in the templates folder so far, the index page and the second page. Here's the code:
from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def home():
return render_template('home.html')
@app.route('/about')
def about():
return render_template('about.html')
if __name__ == '__main__':
app.run(debug=True)
Aucun commentaire:
Enregistrer un commentaire