Static Files
Our pages have already been styled using Bootstrap however to make greater modifications we will need to add our own CSS. This can also be extended into serving images or JavaScript using the same method.
By default Flask will treat any files in the static/
directory as static files which allows us to serve them directly. We can create a static/
directory in our project root and add a style.css
file to it.
With our reference of url_for("static", filename="style.css")
in our base.html
it will now autmatically load this CSS across our site.