Commenting within Jinja2 HTML Template

This one took me a while to find (in my case). I assumed it was not possible and was lazy to look around. But, after wearing my irregular bucket hat I decided to go for it. I found it! and it was very simple. If you need to comment within a Jinja2 template you need …

Changes in Flask Don’t Show in Docker Compose

When working on my blood pressure readings app I noticed changes in Flask Don’t Show in Docker Compose automatically. I had to do a docker compose down and then up to see a simple change to one of my HTML template files. This got me very frustrated and I had to run to the kitchen …

Docker failed to solve with frontend dockerfile.v0: failed to create LLB definition

I was working on improving my Flask skills and at the same time learning about REST APIs and how to build them using Flask, Docker, MongoDB and AWS. I’m using git in order to have my code available and practice whether at home or at the office macOS computer I have. Somehow, after pushing my …

Python’s built-in HTTP server handy one

While building my own Flask application for learning purposes. I was not sure how it was being served on the web. I did not install Apache of any other web server, but it is running on my Digital Ocean test server. The I found out about Python’s built-in HTTP server. This final purpose of this …

How to display time in Python

I have been using Flask to teach myself some coding and develop a web application for people with high blood pressure to track their daily blood pressure readings. I wanted to find a way to automatically display the time when a user takes a blood pressure reading. It was quite simple. Use strftime() to display …

How to restart a service running in docker compose

I’m playing with docker-compose for a test Flask app. My docker-compose.yml looks like this: I noticed any change I made in my files within my templates folder did not take effect when I reloaded the browser locally at localhost:5000 So, I found that I can just restart the ‘www’ service defined on my docker-compose.yml file …