I am currently trying to learn how to develop flask applications. However, I've encountered an issue where the CSS code I write never seems to be applied when linked to my HTML template. No matter what I try, the styles just won't show up.
Here is the snippet of code that links my HTML template to the CSS file:
<link rel="stylesheet" href="{{ url_for('static',filename='css/base.css') }}">
Despite my efforts, including restarting the server and researching online resources like this CSS not being applied in Flask app, nothing has worked so far.
After checking the terminal output, it seems like my server is unable to find the CSS file:
* Serving Flask app "app" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: on
* Restarting with stat
* Debugger is active!
* Debugger PIN: 222-949-106
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
127.0.0.1 - - [11/Nov/2020 21:18:46] "GET /login HTTP/1.1" 200 -
127.0.0.1 - - [11/Nov/2020 21:18:47] "GET /login HTTP/1.1" 200 -
The absence of any mention of the CSS file in the output leads me to believe that there might be an error in the setup. Can anyone assist me in finding what's causing this issue?