https://levelup.gitconnected.com/enhancing-template-magic-with-custom-jinja-filters-in-flask-2c28e867bda7