Written by Sümeyye Sever (notes I took while learning Python)
Set up the Server:
from flask import Flask, render_template
app = Flask(__name__)
@app.route("/")
def home():
return render_template("index.html")
if __name__ == "__main__":
app.run(debug=True)
Create the templates and static files in your python project. Files tree should look like this:
Download the template files and extract it:
HTML5 UP is one of the best websites where you can find free website templates.
Move over relevent parts from dowloaded template files to project folder.
assets and images folders go into static folderindex.html file go into templates folder.Change the parts that need to be changed.
static/assets and static/images so that css works and also images shows on the webpage when you run the project. Find and replace shortcut → Ctrl + O + Rindex.html file for your likings.Run.