I'm not really a big fan of how writing custom template tags throws you back into the land of string substitution: the entire problem that templating languages were meant to solve in the first place!
Jinja2's macros are a much more elegant solution, IMO.
Jinja2's macros are a much more elegant solution, IMO.