Update template.py

Added some useful custom filters