Written by Sümeyye Sever (notes I took while learning Python)


  1. 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)
    
  2. Create the templates and static files in your python project. Files tree should look like this:

  3. Download the template files and extract it:

    HTML5 UP is one of the best websites where you can find free website templates.

  4. Move over relevent parts from dowloaded template files to project folder.

  5. Change the parts that need to be changed.

  6. Run.