A sample Blog application made with Python Flask v2.3.3, Jinja2 v3.1.2 and Bootstrap v5.3.2
Using Bootstrap for relieving pain writing css. A few practice borrowed from Node.js + EJS stack, such as:
- using different layouts for different pages
- introduced controllers (that of MVC) to take over request processing and response sending
source ./venv/bin/activate
flask init-db
flask run --debug
Markdown Cheatsheet Example of Flask App
Can't just run pytest
, have to run pytest as a module in python (which adds the current directory to sys.path).
Read More
python -m pytest -vv
or
coverage run -m pytest
coverage report