July 2019
Beginner to intermediate
302 pages
9h 38m
English
Flask recommends a specific way of organizing static files in an application, as follows:
my_app/
- app.py
- config.py
- __init__.py
- static/
- css/
- js/
- images/
- logo.png
While rendering this in templates (say, the logo.png file), we can refer to the static files using the following code:
<img src='/static/images/logo.png'>