Reputation: 1
WHY IT DOES NOT SHOW WHAT I'VE WRITTEN IN HOME.HTML AND IT RESULTS TO THAT ERROR?
from flask import Flask, render_template
app = Flask(__name__)
@app.route("/")
def home_page():
return render_template('home.html')
app.debug = True
if __name__ == "__main__":
app.run()
Upvotes: 0
Views: 79
Reputation: 743
You do have to specify the port in the app.run()
call like app.run(port=8080, debug=True)
. Also check whether home.html
is existing in the templates
folder.
Upvotes: 1