Building custom template tags in Jinja2 is not an easy task. That used to be the case, which you will see below.
tl;dr: Give jinja2-simple-tags a try.
Why would you create a custom template tag?
From the docs:
By writing extensions you can add custom tags to Jinja. This …