Added template filter support to generator.py