1. Set up main script for running
from flask import Flask, render_template, url_for
# modules that are needed in this part.
# render_template can render the template we defined in the templates folder with the passed arguments for this function.
# url_for can locate the exact routes.
2. Create a directory "templates" for different html files. like "home.html", "about.html"... But most important, a "layout.html" should be created for the main style of the webset page. The other pages can extend this page. There are some blocks that can be extended in "layout.html". Like
{% block content %}{% endblock %}
3. Besides, we can define some customer style in a css file. And since in Flask, static files like JavaScript CSS need to be located in a static directory. we can put all customer information in a main.css file in this folder. And in layout.html, we should include this.
4. url_for function will find the exact location of routes for us. And in "layout.html" we can insert the following line into the <head> tag to access the main.css file mentioned above.
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='main.css') }}">