100 Days of Code: Day 56
Notes of 100 Days of Code: The Complete Python Pro Bootcamp.
Using render_template to import html and other files into flask.
You should create a folder named templates to place those files.
For static files (styles.css, images etc), save these into static folder under templates.
from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def hello():
return render_template('index.html')
if __name__ =='__main__':
app.run(debug=True)